FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FLAT BUTTON does NOT executes its action by Pressing Alt Key
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
FLAT BUTTON does NOT executes its action by Pressing Alt Key
Posted: Mon Feb 18, 2019 09:56 AM

Dear All ,

I am using FLATBTN its working only with Mouse Click and Enter Key. But Normal button work also with Hot Key as we define "&" in the button Lable e.g. "&Delete" . When user press ALT+D its execute the code block but its NOT happening with FLATBTN. How we can achieve the same with FLATBTN as well ?

Thanks
Shridhar

Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: FLAT BUTTON does NOT executes its action by Pressing Alt Key
Posted: Sun Feb 24, 2019 03:16 PM
Dear All ,

Flat Button and Normal Button behavior is NOT same. Please check/test below the code
1) Flat Button executes the Code Block/Action only when user PRESS ENTER Key
2) Normal Button execute the Code Block/Action when user PRESS ENTER Key , SPACE BAR and Alt+Macro(&) Char e.g. Alt+B

Can FLATBTN work as same as BUTTON ( Normal ) ? Please guide on this.

Code (fw): Select all Collapse
PROCEDURE TestBtns
local aoBTN := Array(5)
local oDlg

   DEFINE DIALOG oDlg FROM 0 , 0 TO 500 ,1050 PIXEL TRUEPIXEL

  @ 100, 100 FLATBTN aoBTN[1] PROMPT "&F-Quit" SIZE 100, 40 PIXEL  OF oDlg ;
      ACTION oDlg:End()


  @ 200, 100 BUTTON aoBTN[2] PROMPT "&B-Quit" SIZE 100 , 40 PIXEL OF oDlg ;
      ACTION oDlg:End()

  ACTIVATE DIALOG oDlg CENTERED

return nil


Thanks
shridhar
Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: FLAT BUTTON does NOT executes its action by Pressing Alt Key
Posted: Sun Feb 24, 2019 08:17 PM
Hello Shridhar,
switch to
BTNBMP PROMPT "test" SIZE 80, 32 PIXEL OF oDlg FLAT COLOR CLR_WHITE,METRO_CYAN;

FLATBTN is not well supported and you get the same look with BTNBMP FLAT.
Best regards
Otto
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: FLAT BUTTON does NOT executes its action by Pressing Alt Key
Posted: Mon Feb 25, 2019 05:29 AM

Hi Otto ,

Thanks a lot ...! Its working as per expected.

Thanks
Shridhar

Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB

Continue the discussion