thexshadow Posted March 6, 2010 Posted March 6, 2010 Yes, I know this has been posted before. This is what I have. So, when checkbox $1 is checked, $OK is enabled, when it is enabled it flickers when you move your mouse, but not when it is disabled (which is where GUICtrlSetState($OK, $GUI_DISABLE) came into play). So, how could I make it so when $OK is activated, the button does not flicker? $OK = GUICtrlCreateButton("Ok!", 252, 308, 40, 24) GUICtrlSetState($OK, $GUI_DISABLE) bla bla bla While 1 $msg = GUIGetMsg() Switch $msg Case $msg = $build If BitAND(GUICtrlRead($1),$GUI_CHECKED) Then GUICtrlSetState($OK, $GUI_ENABLE) EndIf Case -3 Exit EndSwitch WEnd
Developers Jos Posted March 6, 2010 Developers Posted March 6, 2010 Only enable the button when its disabled by also testing the button state. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
thexshadow Posted March 6, 2010 Author Posted March 6, 2010 (edited) Ah, thank you, perfect. Case $msg = $OK If BitAND(GUICtrlRead($1),$GUI_UNCHECKED) Then If BitAND(GUICtrlGetState($OK), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($OK, $GUI_DISABLE) Else If BitAND(GUICtrlGetState($OK), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($OK, $GUI_ENABLE) EndIf Edited March 6, 2010 by thexshadow
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now