FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour bKeydown Dialog
Posts: 99
Joined: Wed Nov 02, 2005 10:40 AM
bKeydown Dialog
Posted: Wed Jan 11, 2006 01:50 PM
See the bellow example.
Type a number inside the textbox and press f2.The odlg:bkeydown is fired by I don't get the value of nFld item.I have to press f2 twice to see the value .Is there a solution for that?



Example:

#include "fivewin.ch"


function main()
local oDlg,nFld:=0

define dialog oDlg ;
from 10,10 to 100,200 pixel

@ 0,0 get nFld size 50,14 pixel of oDlg

oDlg:={|nKey,nFlag|if (nKey==113,msginfo(nFld),nil)}

activate dialog oDlg

return ""
Posts: 99
Joined: Wed Nov 02, 2005 10:40 AM
Re: bKeydown Dialog
Posted: Wed Jan 11, 2006 01:59 PM
ask wrote:See the bellow example.
Type a number inside the textbox and press f2.The odlg:bkeydown is fired by I don't get the value of nFld item.I have to press f2 twice to see the value .Is there a solution for that?



Example:

#include "fivewin.ch"


function main()
local oDlg,nFld:=0

define dialog oDlg ;
from 10,10 to 100,200 pixel

@ 0,0 get nFld size 50,14 pixel of oDlg

oDlg:={|nKey,nFlag|if (nKey==113,msginfo(nFld),nil)}

activate dialog oDlg

return ""



As i can see you can change the above to:

#include "fivewin.ch"


function main()
local oDlg,nFld:=0,oFld

define dialog oDlg ;
from 10,10 to 100,200 pixel

@ 0,0 get oFld var nFld size 50,14 pixel of oDlg

oDlg:={|nKey,nFlag|if (nKey==113,(oFld:Assign(),msginfo(nFld)),nil)}

activate dialog oDlg

return ""


But i don't thing that it's the best solution
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
bKeydown Dialog
Posted: Wed Jan 11, 2006 03:19 PM

Ask,

The GET does not update its value until it looses focus or you assign it, as you are doing in your code.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 99
Joined: Wed Nov 02, 2005 10:40 AM
bKeydown Dialog
Posted: Wed Jan 11, 2006 03:21 PM
Antonio Linares wrote:Ask,

The GET does not update its value until it looses focus or you assign it, as you are doing in your code.


OK. Thanks Antonio

Continue the discussion