[Gambas-user] OOP and TextBox
charlesg
charles at ...1784...
Fri Nov 21 10:58:27 CET 2008
Hello,
I need more control of cell entry than can be provided by tableview. I have
laboriously placed textboxes over (and under) gridview cells in much the
same way I imagine that tableview itself is constructed. It works.
Not knowing much about OOP it strikes me that there must be an easier
solution. Can I create say forty textboxes programmatically and then move
from one to the other also under program control? I suppose what I am
looking for is textbox[] :-D. If that were possible then the following could
be reduced to one sub.
' Gambas class file
PUBLIC SUB txt1_KeyPress()
IF Key.code = Key.right THEN
{dosomething with the entry then}
txt2.SetFocus
ENDIF
END
PUBLIC SUB txt2_KeyPress()
IF Key.code = Key.right THEN
{dosomething with the entry then}
txt3.SetFocus
ENDIF
END
PUBLIC SUB txt3_KeyPress()
IF Key.code = Key.right THEN
{dosomething with the entry then}
txt4.SetFocus
ENDIF
END
PUBLIC SUB txt4_KeyPress()
IF Key.code = Key.right THEN
{dosomething with the entry then}
txt1.SetFocus
ENDIF
END
--
View this message in context: http://www.nabble.com/OOP-and-TextBox-tp20618177p20618177.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list