FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Change the bitmap of GET ACTION
Posts: 130
Joined: Sat Oct 08, 2005 09:38 PM
Change the bitmap of GET ACTION
Posted: Wed Feb 05, 2020 08:48 PM
How can I change the bitmap of the GET with ACTION, when the user clicks on action button.
I have a login dialog and I want to show/Hide the password when the user clicks the button.

Code (fw): Select all Collapse
 REDEFINE GET oPsw VAR cPsw ID 102 OF oDlg FONT oFont PASSWORD UPDATE ;
BITMAP "BTN_SHOWPSW" ;
ACTION ( oPsw:lPassword := !oPsw:lPassword, ;
         // Here I want to change it Something like IF( oPsw:lPassword, oPsw:cBitMap := "BTN_SHOWPSW", oPsw:cBitMap := "BTN_HIDEPSW")
         oDlg:UpDate() )
Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
Posts: 99
Joined: Thu Jul 12, 2007 02:02 PM
Re: Change the bitmap of GET ACTION
Posted: Thu Feb 06, 2020 11:03 AM
Hi,

try this code

Code (fw): Select all Collapse
REDEFINE GET oPsw VAR cPsw ID 102 OF oDlg FONT oFont PASSWORD UPDATE ;
    BITMAP "BTN_SHOWPSW" ;
    ACTION ( oPsw:lPassword := !oPsw:lPassword, ;
             oPsw :oBtn:LoadBitmap( IIF( oPsw:lPassword, "BTN_SHOWPSW", "BTN_HIDEPSW" ) ), ;
             oDlg:UpDate() )
Posts: 130
Joined: Sat Oct 08, 2005 09:38 PM
Re: Change the bitmap of GET ACTION
Posted: Thu Feb 06, 2020 12:46 PM

Perfect. Thank you very much.

Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Change the bitmap of GET ACTION
Posted: Tue May 28, 2024 04:02 AM
Somehow I can't get this to work with FWH2404
Code (fw): Select all Collapse
oPsw :oBtn:LoadBitmap( IIF( oPsw:lPassword, "BTN_SHOWPSW", "BTN_HIDEPSW" ) ), ;
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Change the bitmap of GET ACTION
Posted: Tue May 28, 2024 09:43 AM
hua wrote:Somehow I can't get this to work with FWH2404
Code (fw): Select all Collapse
oPsw :oBtn:LoadBitmap( IIF( oPsw:lPassword, "BTN_SHOWPSW", "BTN_HIDEPSW" ) ), ;
I use Resource dialog working fine.
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Change the bitmap of GET ACTION
Posted: Wed May 29, 2024 03:55 AM

Thanks for your feedback Richard

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion