Page 1 of 1
'Ends'
Posted: Sunday 14th January 2018 5:14pm
by cogier
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: -
- Example of Ends.png (169.4 KiB) Viewed 5495 times
Re: 'Ends'
Posted: Monday 15th January 2018 10:05am
by stevedee
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.
- HiBye.png (14.98 KiB) Viewed 5492 times
Re: 'Ends'
Posted: Monday 15th January 2018 3:16pm
by cogier
Excellent! Well using that method you could shorten: -
TextBox1.Text = Mid((Last.name), InStr(Last.name, "Button") + Len("Button"))
To
TextBox1.Text = Mid(Last.name, InStr(Last.name, "Button") + 6)
It just goes to show that there is always another way to do things.