Jump to content

keep on bottom of list


corgano
 Share

Recommended Posts

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

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

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.
Link to comment
Share on other sites

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

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

~ (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 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

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

#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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...