Change the bitmap of GET ACTION

Post Reply
User avatar
betoncu
Posts: 120
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

 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: 85
Joined: Thu Jul 12, 2007 2:02 pm
Contact:

Re: Change the bitmap of GET ACTION

Post by MaxP »

Hi,

try this code

Code: Select all

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: 120
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
Post Reply