deathday Posted February 9, 2009 Share Posted February 9, 2009 I think there is a problem with checkbox font color , i try to change the font color of checkbox but i couldn't change it , there maybe be something wrong i don't know , i created a checkbox using Koda and the i tried Guictrlsetcolor to change the font color to white but its not changing .i have played with it for hours but no lcuk , can anyone tell what i am doing wrong ..... Link to comment Share on other sites More sharing options...
martin Posted February 9, 2009 Share Posted February 9, 2009 (edited) I think there is a problem with checkbox font color , i try to change the font color of checkbox but i couldn't change it , there maybe be something wrong i don't know , i created a checkbox using Koda and the i tried Guictrlsetcolor to change the font color to white but its not changing .i have played with it for hours but no lcuk , can anyone tell what i am doing wrong .....Better to provide some sample code you have which we can work around. Without some code it can be impossible to know what you are doing wrong, and it means that to provide an example we have to write it from scratch rather than modify your code, so we have to do more work than we should to help you. Please bear this in mind next time In XP the XP theme takes control of the colour of the font for checkboxes, so you have to turn XP themes off when you create the checkbox. expandcollapse popup#include <GuiConstants.au3> #include <windowsconstants.au3> Global $XS_n $Gui = GuiCreate("Test") GUISetBkColor(0xa9a9a8) XPStyleToggle(1);turn xp themes off $RadioButton = GUICtrlCreateCheckbox("Example checkbox",20,40,110,20) ;GUICtrlCreateRadio("Text", 20, 40, 40) GUICtrlSetColor(-1, 0xFF0000) XPStyleToggle(0);turn XP themes on again GUICtrlCreateGroup("group 1",10,60,300,200) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("",20,70,300,50,$WS_CLIPSIBLINGS) GUICtrlSetBkColor(-1,0xffff00) ;GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState() GUISetBkColor(0xffff00) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func XPStyleToggle($Off = 1) If Not StringInStr(@OSTYPE, "WIN32_NT") Then Return 0 If $Off Then $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties") DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) Return 1 ElseIf IsArray($XS_n) Then DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0]) $XS_n = "" Return 1 EndIf Return 0 EndFunc Edited February 9, 2009 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
deathday Posted February 12, 2009 Author Share Posted February 12, 2009 (edited) cool info , ididnt knw that before , thanks yo ,, i will keep that in mind for sure, by the way why cant autoit turn off the xp them colcor when we us check box ?i havent seen that info in helpfile, i have gone through th helpfile alot but havent came acroos suhc an info , thanks again...its really an important info... Edited February 12, 2009 by deathday Link to comment Share on other sites More sharing options...
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