'Ends'

Post Reply
Online
User avatar
cogier
Site Admin
Posts: 193
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

'Ends'

Post by cogier » Sunday 14th January 2018 5:14pm

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
Example of Ends.png (169.4 KiB) Viewed 537 times
Example_of_Ends.tar
(97 KiB) Downloaded 55 times

stevedee
Posts: 85
Joined: Monday 20th March 2017 6:06pm

Re: 'Ends'

Post by stevedee » Monday 15th January 2018 10:05am

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
HiBye.png (14.98 KiB) Viewed 534 times
Attachments
LastNameControlExample.zip
(73.56 KiB) Downloaded 40 times

Online
User avatar
cogier
Site Admin
Posts: 193
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: 'Ends'

Post by cogier » Monday 15th January 2018 3:16pm

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. :D

Post Reply