Sign in to follow this  
Followers 0
sherkas

Checkbox Not Registering...

3 posts in this topic

bah...

i made a checkbox. When I click it, and try to access weather its checked or not it wont work.

if ( GUICtrlGetState( $available ) = $GUI_CHECKED ) then

msgbox(0, "We are checked", "We are checked")

$selling[GUICtrlRead( $currentslot ) - 1] = 2

Else

msgbox(0, "We are not checked", "We are not checked")

$selling[GUICtrlRead( $currentslot ) - 1] = 1

EndIf

Basically when I click the button this is in, no matter if it was checked or not its return not checked.

WTF is wrong!?!?!?!?!!

driving me nuts.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Read state or data of a control.

GUICtrlRead ( controlID )

You're using GuiCtrlRead for $currentslot and you've to use the same for the checkbox($available).

Edited by tonedeaf

Share this post


Link to post
Share on other sites

per help

For Checkbox, Radio control several states can be returned as $GUI_FOCUS and $GUI_CHECKED,. So use BitAnd(GUICtrlRead($Item),$GUI_CHECKED) to test if the control is checked.

8)


NEWHeader1.png

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