LarryK Posted November 17, 2010 Posted November 17, 2010 Hi, I'm sure this is straight forward, but I can't find it with a search of the forums. Sorry... I create a GUI with several controls including Labels, Inputs and Lists. I then disable the controls until an item is chosen from a Combo. At that time, I enable certain controls based on the selection made from the Combo control. This all works fine. However, when I disable the control created with GUICtrlCreateList it doesn't turn gray. The control appears to be disabled, the color just does not change to gray like the other controls. Here's the code to disable: $hList = GUICtrlCreateList("", 90, 76, 70, 60, BitOR($LBS_EXTENDEDSEL,$WS_VSCROLL)) . . . GUICtrlSetState($hList, $GUI_DISABLE) Can someone tell me what I'm missing? Thank you! Larry
Moderators Melba23 Posted November 17, 2010 Moderators Posted November 17, 2010 LarryK,Edit controls just do not turn grey when disabled. You could always do it yourself if you really want to:GUICtrlSetBkColor($hList, 0xC4C4C4)But do not forget to turn it back to the normal colour when you re-enable it. 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
LarryK Posted November 17, 2010 Author Posted November 17, 2010 (edited) Melba23, Thank you for the insight. I am still a little confused because the GUICtrlCreateInput get's grayed out when disabled. Isn't it an edit field? I will do the manual graying so it looks correct. Thanks again! Edited November 17, 2010 by LarryK
Moderators Melba23 Posted November 17, 2010 Moderators Posted November 17, 2010 LarryK,the GUICtrlCreateInput get's grayed out when disabledMine do not. For both Input and Edit controls just the edges and text turn grey, the background does not change. 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
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