Change the bitmap of GET ACTION

Change the bitmap of GET ACTION

Postby betoncu » Wed Feb 05, 2020 8: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: Select all  Expand view
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
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Re: Change the bitmap of GET ACTION

Postby MaxP » Thu Feb 06, 2020 11:03 am

Hi,

try this code

Code: Select all  Expand view
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() )
User avatar
MaxP
 
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm

Re: Change the bitmap of GET ACTION

Postby betoncu » Thu Feb 06, 2020 12:46 pm

Perfect. Thank you very much.
Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
User avatar
betoncu
 
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Re: Change the bitmap of GET ACTION

Postby hua » Tue May 28, 2024 4:02 am

Somehow I can't get this to work with FWH2404

Code: Select all  Expand view
oPsw :oBtn:LoadBitmap( IIF( oPsw:lPassword, "BTN_SHOWPSW", "BTN_HIDEPSW" ) ), ;
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Change the bitmap of GET ACTION

Postby richard-service » Tue May 28, 2024 9:43 am

hua wrote:Somehow I can't get this to work with FWH2404

Code: Select all  Expand view
oPsw :oBtn:LoadBitmap( IIF( oPsw:lPassword, "BTN_SHOWPSW", "BTN_HIDEPSW" ) ), ;


I use Resource dialog working fine.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: Change the bitmap of GET ACTION

Postby hua » Wed May 29, 2024 3:55 am

Thanks for your feedback Richard
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

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