|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Oct 2006
Posts: 27
|
[Listbox] Change color of listitem & sort items alphabetically
Hi,
I am using a list box in my custom page. If a checkbox is selected the selected item in the listbox should change its color. How I able to do this? Still another question: Is it possible to sort the items in the listbox alphabetically? Thank you in anticipation |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Oct 2006
Posts: 27
|
Really nobody who can help?
|
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Unless you want to write a plugin there is no way to change the colours for an individual list box item.
To sort the items it'd be easiest to use the NSIS Array plugin. You can add the items to an array with WriteListC, use Sort to sort the array and finally write back to the INI file with Concat. http://nsis.sf.net/File:NSISArray.zip -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
You could also set the LBS_SORT style for the list by calling SetWindowLong using the System plug-in. If that doesn't work, you'd have to change the style on advance when creating it. For that you'd have to change the source code of InstallOptions.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Nov 2006
Location: Reading, UK
Posts: 39
|
Any chance you could give us the magic line to use "LBS_SORT" to sort list boxes. I can't find an example of that.
Thanks, |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
code: Assuming $R0 contains the handle to your list box before you call it. Read it from the INI file HWND key or by using GetDlgItem. Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|