Change the bitmap of GET ACTION

Post Reply
User avatar
betoncu
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Change the bitmap of GET ACTION

Post by betoncu »

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

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
MaxP
Posts: 89
Joined: Thu Jul 12, 2007 2:02 pm
Has thanked: 1 time
Contact:

Re: Change the bitmap of GET ACTION

Post by MaxP »

Hi,

try this code

Code: Select all | Expand

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
betoncu
Posts: 126
Joined: Sat Oct 08, 2005 9:38 pm
Location: Cyprus (North)

Re: Change the bitmap of GET ACTION

Post by betoncu »

Perfect. Thank you very much.
Birol Betoncu
birol.betoncu@gmail.com
Using Harbour, FWH 19.05, BCC7
hua
Posts: 1074
Joined: Fri Oct 28, 2005 2:27 am
Has thanked: 1 time
Been thanked: 1 time

Re: Change the bitmap of GET ACTION

Post by hua »

Somehow I can't get this to work with FWH2404

Code: Select all | Expand

oPsw :oBtn:LoadBitmap( IIF( oPsw:lPassword, "BTN_SHOWPSW", "BTN_HIDEPSW" ) ), ;
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
User avatar
richard-service
Posts: 806
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Has thanked: 1 time
Contact:

Re: Change the bitmap of GET ACTION

Post by richard-service »

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

Code: Select all | Expand

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
hua
Posts: 1074
Joined: Fri Oct 28, 2005 2:27 am
Has thanked: 1 time
Been thanked: 1 time

Re: Change the bitmap of GET ACTION

Post by hua »

Thanks for your feedback Richard
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
Post Reply