Page 1 of 1

Cursor-Position in GET

Posted: Sat Oct 09, 2021 9:16 am
by Volker
Hi,

is there an option (i.e. in DCGETOPTIONS) to set cursor on position 1 when an input-field
gets focus by a mouse click?

At the moment the cursor is in the middle of the text.

I use Xbase 2.00.1334 and eXpress 2.0.266

Best regards
Volker

Re: Cursor-Position in GET

Posted: Sat Oct 09, 2021 12:52 pm
by Wolfgang Ciriack
Hello Volker,
put this at the beginning of your app:

Code: Select all

	DC_XbpGetSetInputFocusBlock({|x, y, o| NIL, ;
	                iif(.not. empty(o:Get:Buffer), o:Get:Pos := o:SavePos, NIL), ;
	                o:DateFlag := .T., ;
	                o:Home(), ;
	                DC_HiLiteGets(o, 1, o:GetList:GetOptions[nGETOPT_HILITECOLOR]), ;
	                DC_ColorGets(o,  1, o:GetList:GetOptions[aGETOPT_COLORGETS]), ;
	                NIL})

Re: Cursor-Position in GET

Posted: Sun Oct 10, 2021 12:03 am
by Volker
Hello Wolfgang,

that works fine - thank you very much.

Volker