Jump to content
Sign in to follow this  
zutto

How to use checkbox?

Recommended Posts

zutto

yeh :E

i havent figured out yet howto use checkbox?

$x1 = GUICtrlCreateCheckbox ("Select this ", 10, 10, 120, 20)

but howto use that?

$x1 = GUICtrlCreateCheckbox ("Select this ", 10, 10, 120, 20)

if $x1 = 1 then

dostuff

endif

or ?

Share this post


Link to post
Share on other sites
ludocus

#include <GUIConstants.au3>

If GUICtrlRead($x1) = $GUI_CHECKED then msgbox(0, 'Checkbox1', 'Checkbox1 is checked)

Share this post


Link to post
Share on other sites
zutto

#include <GUIConstants.au3>

If GUICtrlRead($x1) = $GUI_CHECKED then msgbox(0, 'Checkbox1', 'Checkbox1 is checked)

Thank you.

Share this post


Link to post
Share on other sites
AdmiralAlkex

#include <GUIConstants.au3>

If GUICtrlRead($x1) = $GUI_CHECKED then msgbox(0, 'Checkbox1', 'Checkbox1 is checked)

That is wrong, it should be BitAnd(GUICtrlRead($x1),$GUI_CHECKED) to check if it is checked. It is in the helpfile for GUICtrlRead().

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  

×