Sign in to follow this  
Followers 0
Lord_Doominik

another question about buttons

5 posts in this topic

how could i deactivate a button with $BS_BITMAP, so, that you see the bitmap, but can't click at it?

i thought about doing it with creating a picture, and if its active a button and hide the picture... but is there another way? a better way?

Share this post


Link to post
Share on other sites



Place this code right after the button creation.

GuiCtrlSetState(-1, $GUI_DISABLE)

Share this post


Link to post
Share on other sites

that don't works... i thought too that it must work, but i asked here, cause i tested it and it don't worked... then is the button disabled, but the picture isn't shown too... then you only see teh grey and disabled button...

Share this post


Link to post
Share on other sites

Can I see the code?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

sure, i tryed it with this:

$Cancel = GUICtrlCreateButton("Cancel", (@DesktopWidth-500)/2-142, 2, 40, 37, $BS_BITMAP)
GUICtrlSetState($Cancel, $GUI_DISABLE)
GUICtrlSetImage($Cancel, "Images\Cancel inactive.bmp")
Edited by Lord_Doominik

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0