iorih0406 Posted May 14, 2010 Share Posted May 14, 2010 Hi, I wonder that why I cannot control group's colour. Please see my code as below, $Progress = GUICtrlCreateGroup("Progress", 40, 130, 470, 50) GUICtrlSetColor(-1, 0xFFFFFF) After I read AutoIT help document, It describes "GUICtrlSetColor" supported group of control item. Somehow I don't let the colour becomes white. Thanks in advance. Link to comment Share on other sites More sharing options...
bogQ Posted May 14, 2010 Share Posted May 14, 2010 GUICtrlSetColor ( controlID, textcolor)Do you try to tell that it do not set "Progress" text in to white color?Checkbox, Radio, Group or Progress controls cannot be painted if the "Windows XP/Vista style" is used. TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
VAN0 Posted May 28, 2010 Share Posted May 28, 2010 GUICtrlSetColor ( controlID, textcolor)Do you try to tell that it do not set "Progress" text in to white color?I can confirm, the text color not being changed. In fact the only style I could manage to change is the font size, font/background colors stay default no matter what... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 28, 2010 Moderators Share Posted May 28, 2010 VAN0, You need to remove the Theme from the control if you want to change the text colour - but then you might not like the visual style of teh control: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) GUISetBkColor(0xC4FFC4, $hGUI) $hGroup_1 = GUICtrlCreateGroup("Group 1", 10, 10, 480, 200) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0xFF0000) $hGroup_2 = GUICtrlCreateGroup("Group 2", 10, 210, 480, 200) ; Remove Style from control DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($hGroup_2), "wstr", 0, "wstr", 0) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0xFF0000) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Your choice! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
VAN0 Posted May 28, 2010 Share Posted May 28, 2010 @Melba23: is there anything you don't know? Your are amazingThe style doesn't look that much different, just border is darker...is there a way make text style the same as border style, aka "disabled" with white outline, so it look like it's "pressed in" into gui?P.S.I guess information about removing theme is missing from the help file? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 28, 2010 Moderators Share Posted May 28, 2010 VAN0, is there anything you don't know?I am just a hobbyist - you should see what the real coders around here can do! is there a way make text style the same as border style, aka "disabled"Did you think of disabling it? #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) GUISetBkColor(0xC4FFC4, $hGUI) $hGroup_1 = GUICtrlCreateGroup("Group 1", 10, 10, 480, 200) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0xFF0000) $hGroup_2 = GUICtrlCreateGroup("Group 2", 10, 210, 480, 200) ; Remove Style from control DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($hGroup_2), "wstr", 0, "wstr", 0) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0xFF0000) GUICtrlSetState(-1, $GUI_DISABLE) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd guess information about removing theme is missing from the help file?Note that it took a DLLCall, not a built-in Autoit command, to remove the style - you cannot expect the Help file to hold info on every DLL call! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
lhw Posted March 21, 2011 Share Posted March 21, 2011 so sweet! hope i can write something like this someday 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