Swift Posted March 24, 2008 Share Posted March 24, 2008 GUICreate("") GUISetBkColor(0x000000) GUICtrlCreateCheckbox("checkbox", 1, 1, 100, 100) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlSetColor(-1, 0xFFFFFF) Do Until GUIGetMsg() = -3 It color never changes, its text is still black, and I need the text to be white...and the BK to be black Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted March 24, 2008 Share Posted March 24, 2008 GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlSetColor(-1, 0xFFFFFF)Are you sure you want both to be the same color?? .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 Link to comment Share on other sites More sharing options...
Swift Posted March 24, 2008 Author Share Posted March 24, 2008 No, that was what I was showing you so it you can see that it doesn't change colors, I want it: Text: White BK: Black GUICtrlSetColor(-1, 0xFFFFFF) ; Doesn't make it white GUICtrlSetBkColor(-1, 0x000000) ; Makes it black... So It's invisable... Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted March 24, 2008 Share Posted March 24, 2008 (edited) Well I dont know why it don't work but one possible solution would be to not have any text on the checkbox and put a ordinary label beside it Edit: just saw these in the beta, GUICtrlSetDefColor() & GUICtrlSetDefBkColor() I dont have beta installed so I dont know what they do but they sound interesting Edited March 24, 2008 by AdmiralAlkex .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 Link to comment Share on other sites More sharing options...
Swift Posted March 24, 2008 Author Share Posted March 24, 2008 I cant use beta for this though. It is all in .10 Release. I can't change it...And the only problem with a no text checkbox, is that when you put your mouse over the 'checkbox label' it highlights the checkbox, if there is no 'checkbox label' it wont do that, not even a real label would.. Link to comment Share on other sites More sharing options...
Valuater Posted March 24, 2008 Share Posted March 24, 2008 Maybe...#include <GUIConstants.au3> Dim $XS_n GUICreate("My GUI Checkbox") ; will create a dialog box that when displayed is centered GUISetBkColor(0x000000) If XPStyle(1) Then MsgBox(0,0,"on", 2) $checkCN = GUICtrlCreateRadio("Radio 1", 10, 10, 120, 15) GUICtrlSetColor($checkCN, 0xFF0000) GUICtrlSetBkColor($checkCN, 0x000000);0xFFFFFF) If XPStyle(0) Then MsgBox(0,0,"off", 2) GUISetState() ; will display an dialog box with 1 checkbox ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Func XPStyle($OnOff = 1) If $OnOff And StringInStr(@OSTYPE, "WIN32_NT") Then $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties") DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) Return 1 ElseIf StringInStr(@OSTYPE, "WIN32_NT") And IsArray($XS_n) Then DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0]) $XS_n = "" Return 1 EndIf Return 0 EndFunc ;==>XPStylethere is this and more in Autoit Wrappershttp://www.autoitscript.com/forum/index.ph...st&p=1337698) Link to comment Share on other sites More sharing options...
Swift Posted March 24, 2008 Author Share Posted March 24, 2008 I don't get it, it shows a message box saying: on 2 seconds later: Off. then a gui appears? So...? What exactly does this do...? Link to comment Share on other sites More sharing options...
martin Posted March 24, 2008 Share Posted March 24, 2008 I don't get it, it shows a message box saying: on2 seconds later: Off.then a gui appears? So...? What exactly does this do...?Have a closer look.XPStyle(1) turns off XP visual stylesthen the checkbox is created without the XP styles so setting the colour and background work. Valuater made the font red but you can change that obviously.XPStyle(0) turns XP styles back to what they were before and anything created now will have the usual visual styles. 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...
Swift Posted March 24, 2008 Author Share Posted March 24, 2008 AH! Thank you now! I get it! Thanks! Woot! Thanks Guys! Thanks Valuater! Thanks Martin! Yay! Thanks Everyone! 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