'Ends'

Post

Posted
Rating:
#1 (In Topic #151)
Avatar
Guru
cogier is in the usergroup ‘Guru’
I have discovered a very useful tool in the Gambas toolbox 'Ends' so I thought I would share it with you.

Handle all the controls in the program below in 5 lines of code: -

Attachment

Image

(Click to enlarge)

Online now: Yes Back to the top

Post

Posted
Rating:
#2
Avatar
Regular
stevedee is in the usergroup ‘Regular’
That's great cogier! an interesting example.

I played around with it for a while, and then I sort of 'drifted off', creating this one liner using Last.Name.

Attachment
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Guru
cogier is in the usergroup ‘Guru’
Excellent! Well using that method you could shorten: -

Code (gambas)

  1. TextBox1.Text = Mid((Last.name), InStr(Last.name, "Button") + Len("Button"))
To

Code (gambas)

  1. TextBox1.Text = Mid(Last.name, InStr(Last.name, "Button") + 6)

It just goes to show that there is always another way to do things. :D
Online now: Yes Back to the top
1 guest and 0 members have just viewed this.