FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour GetBtn.prg Sample
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
GetBtn.prg Sample
Posted: Tue May 06, 2014 03:34 PM
To All

Is there a way to move the cursor to the next field when a user clicks on the GetButton .. it appears the default behavior is to return the cursor back to the field.

I have tried to modify GetBtn.prg to force the cursor to the second field by issuing a setfocus, but the cursor always returns back to the get field.

Any way to modify this behavior ?

Thanks
Rick Lipkin
Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local oWnd, oTest,cTest := "Hello world!"
   Local oTest1,cTest1

   cTest1 := space(10)

   DEFINE WINDOW oWnd COLOR "N/W*"

   @ 2,2 GET oTest var cTest SIZE 110, 22 ;
      ACTION (MsgInfo( "click" ),oTest1:SetFocus()) // BITMAP "..\bitmaps\16x16\find.bmp"

   @ 4,2 GET oTest1 var cTest1 size 102,22 UPDATE

   ACTIVATE WINDOW oWnd

return nil
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: GetBtn.prg Sample
Posted: Tue May 06, 2014 03:58 PM
Hello,

try with

Code (fw): Select all Collapse
oTest:lKeepFocus := .F.


regards

Marcelo
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: GetBtn.prg Sample
Posted: Tue May 06, 2014 04:03 PM

Marcello

Your suggestion errors out :(

Rick Lipkin

Application

Path and name: C:\Fox\Protypes\GetButton\getbtn.Exe (32 bits)
Size: 1,853,440 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20131030)
FiveWin Version: FWHX 12.03
Windows version: 5.1, Build 2600 Service Pack 3

Time from start: 0 hours 0 mins 0 secs
Error occurred at: 05/06/14, 12:02:16
Error description: Warning BASE/1005 Message not found: TGET:_LKEEPFOCUS

Stack Calls

Called from: source\rtl\tobject.prg => TGET:ERROR( 0 )
Called from: source\rtl\tobject.prg => TGET:MSGNOTFOUND( 0 )
Called from: source\rtl\tobject.prg => TGET:_LKEEPFOCUS( 0 )
Called from: getbtn.prg => MAIN( 14 )

Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: GetBtn.prg Sample
Posted: Tue May 06, 2014 04:10 PM
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: GetBtn.prg Sample
Posted: Tue May 06, 2014 04:14 PM
Rick:

Try this way

Code (fw): Select all Collapse
   @ 2,2 GET oTest var cTest SIZE 110, 22 ;
      ACTION (MsgInfo( "click" ),oTest1:SetFocus(),oTest:oJump := oTest1) // BITMAP "..\bitmaps\16x16\find.bmp"


With best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: GetBtn.prg Sample
Posted: Tue May 06, 2014 04:21 PM

Marcello

FWH1203 ..

Any other solution ?

Rick Lipkin

Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: GetBtn.prg Sample
Posted: Tue May 06, 2014 04:28 PM
Rick,

only change the tGet Class

http://forums.fivetechsupport.com/viewtopic.php?p=133845#p133845

saludos

Marcelo
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: GetBtn.prg Sample
Posted: Tue May 06, 2014 05:08 PM

Armando

YES, your oJump solution worked nicely. Marcelo, thank you very for your help as well!!

Rick Lipkin

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: GetBtn.prg Sample
Posted: Tue May 06, 2014 05:11 PM
Rick,

Code (fw): Select all Collapse
ACTION (MsgInfo( "click" ),oTest1:PostMsg(WM_SETFOCUS))


EMG
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: GetBtn.prg Sample
Posted: Tue May 06, 2014 05:20 PM

Enrico

Nice and very Elegant solution ..

Thank You!
Rick

just curious .. the .ppo resolved (MsgInfo( "click" ),oTest1:PostMsg(WM_SETFOCUS)) to
(MsgInfo( "click" ),oTest1:PostMsg(7)) },, "cTest", )

Continue the discussion