FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour oGet:SetPos() and date
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM

oGet:SetPos() and date

Posted: Wed Jun 14, 2006 12:35 PM
Hi all,

i have aproblem to set the cursor of a get to the very first position.
I tried the following
oSearch:bGotFocus := { || oSearch:PostMsg( WM_KEYDOWN, VK_HOME, 0 ), SysRefresh() }
oSearch:bGotFocus := { || oSearch:nPos := 1, SysRefresh() }
oSearch:bGotFocus := { || oSearch:SetPos( 1 ) }


All three methods work ok if the get variable is of type character.
But neither of these methods work if the get variable contains a date.

I put a small selfcontainted sample here
http://www.d-hoefner.de/files/test.zip

May be someone knows a workaround for this?

Thanks and regards,
Detlef
Posts: 83
Joined: Tue Nov 08, 2005 11:09 AM

oGet:SetPos() and date

Posted: Wed Jun 14, 2006 01:53 PM

this might help :-

oSearch:bGotFocus := { || oSearch:selectall(), oSearch:nPos:= 1 }

Regards

Hoe, email: easywin3@yahoo.com
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM

oGet:SetPos() and date

Posted: Wed Jun 14, 2006 02:01 PM
tnhoe wrote:this might help :-

oSearch:bGotFocus := { || oSearch:selectall(), oSearch:= 1 }


Hoe,

many thanks for your hint.
Unfortunatelly it doesn' t work.

If i click into the middle of a get with a date variable, the cursor remains at the position where i clicked.
With character gets its working ok.

Thanks for your time, Hoe.
Regards,
Detlef
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

oGet:SetPos() and date

Posted: Wed Jun 14, 2006 02:04 PM

If you will build a reduced and self-contained sample of the problem then I promise to experiment with it a little. :-)

EMG

Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM

oGet:SetPos() and date

Posted: Wed Jun 14, 2006 02:14 PM

Enrico,

I already put a sample at

http://www.d-hoefner.de/files/test.zip

thanks for jumping in.

Regards,
Detlef

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

oGet:SetPos() and date

Posted: Wed Jun 14, 2006 02:48 PM
Try this:

oSearch:bGotFocus := { || oSearch:PostMsg( WM_KEYDOWN, VK_HOME ) }


EMG
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM

oGet:SetPos() and date

Posted: Wed Jun 14, 2006 03:41 PM
EnricoMaria wrote:Try this:

oSearch:bGotFocus := { || oSearch:PostMsg( WM_KEYDOWN, VK_HOME ) }


EMG

Enrico,

as usual, your advice is a good one.
It' s working as expected now :-) .

Thanks a lot for your time.
Regards,
Detlef

Continue the discussion