Page 1 of 1

Setpos in get with picture

Posted: Tue Nov 29, 2016 4:41 pm
by ctoas
Good afternoon and forgive my English.

Positioning cursor in get fields using setpos does not work?

Code: Select all

@ 144,320 GET oGetCEP VAR cCEP PICTURE "99999-999" OF oDlgCLIENTES2 SIZE 046,012 PIXEL COLORS nRGB(000,000,255) 
oGetCEP:nStyle := nOR( oGetCEP:nStyle, ES_LEFT )
oGetCEP:bGotFocus := { || oGetCEP:SetPos( 0 ) } 
 
Thanks

Re: Setpos in get with picture

Posted: Tue Nov 29, 2016 5:14 pm
by Antonio Linares
Try it using 1:

oGetCEP:bGotFocus := { || oGetCEP:SetPos( 1 ) }

Re: Setpos in get with picture

Posted: Tue Nov 29, 2016 9:06 pm
by joseluisysturiz
ctoas wrote:Good afternoon and forgive my English.

Positioning cursor in get fields using setpos does not work?

Code: Select all

@ 144,320 GET oGetCEP VAR cCEP PICTURE "99999-999" OF oDlgCLIENTES2 SIZE 046,012 PIXEL COLORS nRGB(000,000,255) 
oGetCEP:nStyle := nOR( oGetCEP:nStyle, ES_LEFT )
oGetCEP:bGotFocus := { || oGetCEP:SetPos( 0 ) } 
 
Thanks
Probandolo y trabaja bien asi como lo tienes... :shock:

Code: Select all

REDEFINE GET aGet[2] VAR aVar[2] ID 4006 OF oFldx:aDialogs[1] PICTURE oPi:nPi10 UPDATE // NUM.CED.

aGet[2]:bGotFocus := { || aGet[2]:SetPos( 0 ) }