pcjunki Posted June 9, 2015 Posted June 9, 2015 when setting the data for "GUICtrlSetData" how do I not make the data show up in ABC order?I want it to show up hardcoded in the script.
Moderators Melba23 Posted June 9, 2015 Moderators Posted June 9, 2015 pcjunki,In what type of control are you setting the data? If it is a ListBox then you need to remove the $LBS_SORT style, and the same may be true of other controls too.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
pcjunki Posted June 9, 2015 Author Posted June 9, 2015 I'm using this....$list = GUICtrlCreateList("", 0, 0, 153, 800) GUICtrlSetData(-1, "dog|cat|snake|apple")
Moderators Melba23 Posted June 9, 2015 Moderators Posted June 9, 2015 pcjunki,As I suspected. The Help file explains that a ListBox has the following default styles: $LBS_SORT, $WS_BORDER, $WS_VSCROLL - you need to create it without the $LBS_SORT:$list = GUICtrlCreateList("", 0, 0, 153, 800, BitOr($WS_BORDER, $WS_VSCROLL))Now you will get the items listed in the order you set them and not sorted alphabetically.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
jguinch Posted June 9, 2015 Posted June 9, 2015 (edited) As Melba said, you can remove the style by using a specified when you create the list :GUICtrlCreateList("", 176, 32, 121, 97, BitOR($WS_BORDER, $WS_VSCROLL) )Edit : M23 was faster... Edited June 9, 2015 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
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