[Gambas-user] Textbox - Valuebox
Fabián Flores Vadell
fabianfloresvadell at ...626...
Mon Oct 4 18:44:56 CEST 2010
2010/10/4 Biro Zoltan <office.zolano at ...626...>:
> Thank you very much Johny!
>
> BUT!
>
> I can evaluate the key pressed with keypress event, but I cannot make
> the cursor to leave this textbox and to move to the next textbox.
>
> My example:
>
> PUBLIC SUB factura_KeyPress()
> IF Key.Code = Key.Enter OR Key.Code = Key.Return THEN
>
> ' here is neccesary a command for the cursor to leave the current
> object and to move to next object.
>
> ENDIF
> END
>
>
> Is a function or command to make this? Is a system variable where I can
> increase the number of the current object?
Yes, you can use:
'Sets the focus to the next control into the same container that the "LAST"
LAST.Next.SetFocus()
or
Desktop.SendKeys("\t")
The first is my preferred way to do that, because the second implies
that you have to add the Desktop component at your project.
Regards.
--
Fabián Flores Vadell
www.speedbooksargentina.blogspot.com
More information about the User
mailing list