Page 1 of 1

In a TGet, make the cursor jump one position to thr right

PostPosted: Tue Oct 11, 2005 3:54 pm
by Rafael Clemente
Hi everybody

In a TGet(), how can I make the cursor step one position to the right. I have tried oGet:PostMsg( WM_KEYDOWN, VK_RIGHT, 0 ) but it does not seem to work
Any suggestion? Thanks

Rafael

Solved!

PostPosted: Tue Oct 11, 2005 4:15 pm
by Rafael Clemente
It was just a matter of adding SysRefresh() !!! :oops:
Rafael

PostPosted: Tue Oct 11, 2005 4:15 pm
by Antonio Linares
Rafael,

You may try:

Code: Select all  Expand view
oGet:SetPos( oGet:nPos + 1 )

Re: Solved!

PostPosted: Tue Oct 11, 2005 4:16 pm
by Antonio Linares
Rafael Clemente wrote:It was just a matter of adding SysRefresh() !!!


good :D

Re: Solved!

PostPosted: Tue Mar 20, 2007 12:10 pm
by goosfancito
Antonio Linares wrote:
Rafael Clemente wrote:It was just a matter of adding SysRefresh() !!!


good :D

Antonio, este codigo


Code: Select all  Expand view
    redefine get odatos[1]...
    ...

    redefine get odatos[10]...

    oDatos[1]:bValid:= { || oDatos[1]:SetPos( 10 ), SysRefresh(), .T. }

Cuando valida oDatos[1], salta al get en la posicion 10? aca no me esta funcionado.

PostPosted: Tue Mar 20, 2007 12:30 pm
by Antonio Linares
Gustavo,

Si el foco se va a ir a otro control, prueba a hacer:

oGet:nPos := 10

desde el VALID

PostPosted: Tue Mar 20, 2007 12:34 pm
by goosfancito
Antonio Linares wrote:Gustavo,

Si el foco se va a ir a otro control, prueba a hacer:

oGet:nPos := 10

desde el VALID


Code: Select all  Expand view
oDatos[1]:bValid:= { || oDatos[1]:nPos:= 5, SysRefresh(), .T. }


No pasa nada... porque?

PostPosted: Tue Mar 20, 2007 1:00 pm
by Antonio Linares
Cuando vuelve el foco al Get, el cursor no va a otra posiciĆ³n ?

Cambia tambien oGet:oGet:Pos := 10