GetBtn.prg Sample

GetBtn.prg Sample

Postby Rick Lipkin » Tue May 06, 2014 3: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: Select all  Expand view

#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
 
User avatar
Rick Lipkin
 
Posts: 2636
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: GetBtn.prg Sample

Postby Marcelo Via Giglio » Tue May 06, 2014 3:58 pm

Hello,

try with

Code: Select all  Expand view
oTest:lKeepFocus := .F.


regards

Marcelo
Marcelo Via Giglio
 
Posts: 1051
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: GetBtn.prg Sample

Postby Rick Lipkin » Tue May 06, 2014 4: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 )
User avatar
Rick Lipkin
 
Posts: 2636
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: GetBtn.prg Sample

Postby Marcelo Via Giglio » Tue May 06, 2014 4:10 pm

Marcelo Via Giglio
 
Posts: 1051
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: GetBtn.prg Sample

Postby Armando » Tue May 06, 2014 4:14 pm

Rick:

Try this way

Code: Select all  Expand view

   @ 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
User avatar
Armando
 
Posts: 3085
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: GetBtn.prg Sample

Postby Rick Lipkin » Tue May 06, 2014 4:21 pm

Marcello

FWH1203 ..

Any other solution ?

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2636
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: GetBtn.prg Sample

Postby Marcelo Via Giglio » Tue May 06, 2014 4:28 pm

Rick,

only change the tGet Class

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

saludos

Marcelo
Marcelo Via Giglio
 
Posts: 1051
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: GetBtn.prg Sample

Postby Rick Lipkin » Tue May 06, 2014 5:08 pm

Armando

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

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2636
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: GetBtn.prg Sample

Postby Enrico Maria Giordano » Tue May 06, 2014 5:11 pm

Rick,

Code: Select all  Expand view
ACTION (MsgInfo( "click" ),oTest1:PostMsg(WM_SETFOCUS))


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8379
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: GetBtn.prg Sample

Postby Rick Lipkin » Tue May 06, 2014 5: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", )
User avatar
Rick Lipkin
 
Posts: 2636
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 44 guests