corgano Posted September 21, 2010 Share Posted September 21, 2010 I have a list control. In it are 3 things (say apples, peaches, oranges, zukini). The list will show apples oranges peaches zukini If I want to make one of the things (say oranges) on top, I can add a "!" in front of it, and I would get !oranges apples peaches zukini What can I add in front of it to make it bottom? What can I put on the front of it that will make it come after z? 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
Varian Posted September 21, 2010 Share Posted September 21, 2010 (edited) zz comes after z. Add z to all and then add zz to the one you want last. Z to the Nth + 1 comes after Z to the Nth Edited September 21, 2010 by Varian Link to comment Share on other sites More sharing options...
seandisanti Posted September 21, 2010 Share Posted September 21, 2010 zz comes after z. Add z to all and then add zz to the one you want last. Z to the Nth + 1 comes after Z to the Nthor you could go with "{" or any other character with a greater ascii value than Z i believe, even unprintable characters that may save you a function call to strip the character. Link to comment Share on other sites More sharing options...
Varian Posted September 21, 2010 Share Posted September 21, 2010 or you could go with "{" or any other character with a greater ascii value than Z i believe, even unprintable characters that may save you a function call to strip the character. What method of sorting are we talking about? It may not be relevant, but when do an _ArraySort(), letters come after the brackets, braces, etc. I don't know enough about how the sorting work's, but if it's like in Windows Explorer, those symbols come before letters. Please explain for (my) future reference. Example:#include <Array.au3> Local $Array[11] = ["z", ' ', "(", ")", "[", "}", "]", "{", "a", "Z", "g"] Local $Letter[11][2] For $i = 0 to 10 $Letter[$i][0] = $Array[$i] $Letter[$i][1] = $i & ' original position' Next _ArraySort($Letter) If Not @error Then _ArrayDisplayEx($Letter) Exit EndIF Link to comment Share on other sites More sharing options...
smashly Posted September 21, 2010 Share Posted September 21, 2010 Hi, Another way to keep an item at the desired position in the list... Remove the default $LBS_SORT style from the list and fill the list in the order you want. I know it's not what was asked, but just thinking outside the list, err.. I mean box Cheers Link to comment Share on other sites More sharing options...
Varian Posted September 21, 2010 Share Posted September 21, 2010 I know it's not what was asked, but just thinking outside the list, err.. I mean boxCheersIt's what you do inside the box that counts... Link to comment Share on other sites More sharing options...
corgano Posted September 29, 2010 Author Share Posted September 29, 2010 I am currently applying z to the beginning, but I was hoping there was a way to turn sorting off, or to set something to the bottom. Something more elegant then a z. 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
GEOSoft Posted September 29, 2010 Share Posted September 29, 2010 (edited) ~ (tilde) or Chr(127) which is the delete symbol should do it. In either case, first or last, I suggest unprintable characters will be best. Edit: Braindead moment. Whats wrong with setting the style to BitOr($WS_BORDER, $WS_VSCROLL). Leaving out the $LBS_SORT should allow you to keep the order you set. Edited September 29, 2010 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
corgano Posted September 29, 2010 Author Share Posted September 29, 2010 OH. I Didn't know that existed, I will have to test it tomorrow. If you would be as kind as to place an example I would appreciated it 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
GEOSoft Posted September 29, 2010 Share Posted September 29, 2010 #include <WindowsConstants.au3> GUICreate("") $sData = "Apples|Watermellons|Oranges|Pears" $hList = GUICtrlCreateList("", 10, 10, 80, 80, BitOr($WS_BORDER, $WS_VSCROLL)) GUICtrlSetData($hList, $sData) GUISetState() While 1 If GUIGetMsg() = -3 Then Exit WEnd George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
corgano Posted September 30, 2010 Author Share Posted September 30, 2010 Thankyou. This will help greatly 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
GEOSoft Posted September 30, 2010 Share Posted September 30, 2010 Glad to be of assistance George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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