Valnurat Posted September 6, 2016 Posted September 6, 2016 (edited) I have created a checkbox and a date component by doing this: $idDate = GUICtrlCreateDate("", 270, 190, 120, 20) ;330 GUICtrlSetState($idDate, $gui_disable) $idCheckBox = GUICtrlCreateCheckbox("End date:", 190, 190, 65, 20, BitOR($BS_RIGHTBUTTON, $BS_CHECKBOX)) and to check if it's checked or not I do this: If _IsChecked($idCheckbox) Then GUICtrlSetState($idDate,$gui_enable) Else GUICtrlSetState($idDate,$gui_disable) EndIf Func _IsChecked($idControlID) Return BitAND(GUICtrlRead($idControlID), $GUI_CHECKED) = $GUI_CHECKED EndFunc ;==>_IsChecked but the checkmark is not shown and the date component will not be enabled or disabled for that matter, but if I do this: $idCheckBox = GUICtrlCreateCheckbox("End date:", 190, 190, 65, 20) It works. But then the text on the checkbox, is on the wrong side. Do I do something wrong with my creation of the checkbox? EDIT: $idCheckBox = GUICtrlCreateCheckbox("End date:", 190, 190, 65, 20, BitOR($GUI_SS_DEFAULT_CHECKBOX,$BS_RIGHTBUTTON)) Edited September 6, 2016 by Valnurat Found the solution Yours sincerely Kenneth.
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