2010/10/4 Biro Zoltan <[email protected]>:
> 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

------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security 
easier or more difficult to achieve? Read this whitepaper to separate the 
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to