FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Button Action Code oGet:SetFocus NOT working
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Button Action Code oGet:SetFocus NOT working
Posted: Sat Sep 29, 2018 05:37 PM
Dear All ,

Please let me know where I am doing mistake...!

Below Button Action working but aoGET[1]:SetFocus() works only when PRESS SPACE BAR but it does NOT work PRESS ENTER KEY.

Code (fw): Select all Collapse
   @   070,   200  GET aoGET[ 1 ] VAR aPrdCat[2] SIZE 315, C_GETH PIXEL OF oWnd ;
                  COLOR C_FCLR, C_BCLR FONT oApp:oFontGet UPDATE
   
  .....

   @  300, 500 BUTTON oBtn1 PROMPT "&Save" SIZE C_BTNW , C_BTNH PIXEL OF oWnd  ;
      FONT oApp:oFontBTN1  ;
      ACTION ( mprdcat_save(@aPrdCat)  , oWnd:Update() , aoGET[ 1 ]:SetFocus() )
      
      // also tried below 
      //ACTION ( mprdcat_save(@aPrdCat)  , oWnd:Update() ,  SetFocus( aoGET[ 1 ]:hWnd )  )


Thanks
Shridhar
Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Button Action Code oGet:SetFocus NOT working
Posted: Sun Sep 30, 2018 01:45 PM
Try

Code (fw): Select all Collapse
aoGET[ 1 ]:oGet:SetFocus()


EMG
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: Button Action Code oGet:SetFocus NOT working
Posted: Sun Sep 30, 2018 02:05 PM
Dear Sir ,

It is working below code ...!

aoBtn[1]:oJump := aoGET[ 1 ]

Code (fw): Select all Collapse
 aoBtn[1]:bAction := < ||
                                                     mprgcomp_save(@aPrdComp)
                           oWnd:Update()
                           aoBtn[1]:oJump := aoGET[ 1 ]
                           SetFocus( aoGET[ 1 ]:hWnd )

                          >


Thanks you very much for your kind support.

Thanks
Shridhar
Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Button Action Code oGet:SetFocus NOT working
Posted: Sun Sep 30, 2018 02:08 PM
shri_fwh wrote:Dear Sir ,

It is working below code ...!

aoBtn[1]:oJump := aoGET[ 1 ]


Right, I forgot oJump.

EMG

Continue the discussion