Getting the name of a control on a form
Posted
#1
(In Topic #1125)
Trainee
I'm new to Gambas so I am still finding my way around. I have a question that I hope someone can answer for me.
I have a form with a TabStrip on it that contains five tabs. Each tab has a TextArea on it, 1 through 5. If I want to copy text into the TextArea of one of the tabs I have to find out what tab has been selected and then copy or paste into the TextArea;
If TabStrip.Index = 0 then TextArea1.Cut
If TabStrip.Index = 1 then TextArea2.Cut
and so on…
Is there a more elegant way of achieving this?
What I would like is;
Get the name of the TextArea on currently active Tab and put that into variable tArea
and instead of TextArea1.Cut use tArea.Cut
Any suggestions are welcome.
Thanks for reading
Pusherman
Posted
Guru

Or access it by name this way …
Or this..
Posted
Trainee
1 guest and 0 members have just viewed this.



