MiserableLife Posted December 25, 2009 Posted December 25, 2009 (edited) hello all, How do you make a coloured checkbox in autoit? I've tried to make one by making a checkbox and a label... but I think there must be a better way to do it.... Help file: 'Checkbox, Radio, Group or Progress controls cannot be painted if the "Windows XP/Vista style" is used.' Sucessed code: #include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) $GUI = GUICreate("") GUISetBkColor ( 0x003300 , $GUI );Dark green $Checkbox = GUICtrlCreateCheckbox ("",20,20,15,15) $Label = GUICtrlCreateLabel("I'm a label.",40,20) GUICtrlSetColor ( $Label , 0xFFCC33);orange GUICtrlSetOnEvent($label,"OnEvent_Label") GUISetState(@SW_SHOW) While 1 sleep(100) WEnd Func OnEvent_Label() If GUICtrlRead ($Checkbox) = $GUI_CHECKED Then GUICtrlSetState($Checkbox,$GUI_UNCHECKED) Else GUICtrlSetState($Checkbox,$GUI_CHECKED) EndIf EndFunc Failed Code: GUICreate("") $Checkbox = GUICtrlCreateCheckbox ('Shortcut on Desktop',20,20) GUICtrlSetColor ( $Checkbox , 0xFFCC33);orange GUISetState(@SW_SHOW) While 1 sleep(100) WEnd Edited December 25, 2009 by MiserableLife
AdmiralAlkex Posted December 25, 2009 Posted December 25, 2009 So why don't you disable the "Windows XP/Vista style"? See post 3 and 11 in THIS thread for examples. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
MiserableLife Posted December 25, 2009 Author Posted December 25, 2009 = ="" I think I've asked the wrong question.... Thanks!
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