Button Action Code oGet:SetFocus NOT working

Button Action Code oGet:SetFocus NOT working

Postby shri_fwh » Sat Sep 29, 2018 5: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: Select all  Expand view  RUN


   @   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 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm


Re: Button Action Code oGet:SetFocus NOT working

Postby shri_fwh » Sun Sep 30, 2018 2:05 pm

Dear Sir ,

It is working below code ...!

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

Code: Select all  Expand view  RUN

 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 19.12, BCC 7 32 bit, MariaDB
shri_fwh
 
Posts: 301
Joined: Mon Dec 07, 2009 2:49 pm

Re: Button Action Code oGet:SetFocus NOT working

Postby Enrico Maria Giordano » Sun Sep 30, 2018 2:08 pm

shri_fwh wrote:Dear Sir ,

It is working below code ...!

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


Right, I forgot oJump.

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: MGA and 70 guests