BeBoP Posted January 2, 2012 Share Posted January 2, 2012 Hi, I'm working with a simple GUI combo box but I want to add an item that would not be selectable and only used to seperate the list of items into groups labled by that item. Is this possible? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 3, 2012 Moderators Share Posted January 3, 2012 BeBoP, You will have to do it in code like this: #include <GUIConstantsEx.au3> #include <GuiComboBox.au3> $hGUI = GUICreate("Test", 500, 500) $hCombo = GUICtrlCreateCombo("", 10, 10, 200, 20) GUICtrlSetData(-1, "1|2|3|------|4|5|6") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hCombo ; Look for the separator If GUICtrlRead($hCombo) = "------" Then ; And remove it _GUICtrlComboBox_SetEditText($hCombo, "") EndIf ; Prove there is nothing to read ConsoleWrite(GUICtrlRead($hCombo) & @CRLF) EndSwitch WEnd All clear? M23 Mechaflash 1 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...
JScript Posted August 14, 2012 Share Posted August 14, 2012 After a web search, I found this post and found it interesting but not as a true separator line!I know it can be done using OwnerDraw / MeasureItem that are also used in ModernMenu, I tried to adapt the code but is giving many errors ...I do not know much about combobox and if anyone can give would help a great value!I found this link ComboBox OwnerDraw in 5 minutes who talks a lot but could not adapt!Sample:Regards,João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
JScript Posted August 16, 2012 Share Posted August 16, 2012 (edited) After a brief study and support of members of AutoItBrasil, we come to the following examples:Download:ComboBox_LineSeparator_Beta.zipNew updates:ComboBox_LineSeparator_Beta.zipCredits:MedabiV!c†o®joelson0007BeliniJScriptAnyone wishing to make an improvement, feel free!Regards,João Carlos. Edited August 16, 2012 by JScript UEZ 1 http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 16, 2012 Moderators Share Posted August 16, 2012 JScript & friends, Very nice! 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...
JScript Posted August 16, 2012 Share Posted August 16, 2012 I'm very glad you liked it, thank's! Regards, João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
UEZ Posted August 16, 2012 Share Posted August 16, 2012 @JScript & Co: nice stuff! Thanks for sharing. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
JScript Posted August 16, 2012 Share Posted August 16, 2012 Thanks for having liked and clicked in [Like This] ! Regards,João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
UEZ Posted August 16, 2012 Share Posted August 16, 2012 Another good link: Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
JScript Posted August 16, 2012 Share Posted August 16, 2012 Excellent, I had not seen this topic! Both doors open to the imagination, that is. Regards, João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! 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