[Gambas-user] OOP and TextBox
Jacky
jscops at ...11...
Fri Nov 21 11:52:26 CET 2008
Le Friday 21 November 2008 10:58:27 charlesg, vous avez écrit :
> 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
Salut
This is an example i have made for my program. I hope it is that you want ?
Jacky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test_tableview.tar.gz
Type: application/x-tgz
Size: 10555 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20081121/aa468ff4/attachment.bin>
More information about the User
mailing list