WINAMP.COM | Forums > Developer Center > NSIS Discussion > nsDialogs - using ${NSD_CreateListBox} |
Last Thread
Next Thread
|
| Author |
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
You can add items with LB_ADDSTRING. code: __________________ |
||
|
|
|
jeffadams78 Junior Member
Registered: Aug 2007 |
How do you get the selection from the list box? And can you have a change function? |
||
|
|
|
Afrow UK Moderator
Registered: Nov 2002 |
Look up MSDN for LB_ADDSTRING and you will see all the other list box messages available. __________________ |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
Send LB_GETCURSEL to get the selected state of an item. List box notification is only sent when the LBS_NOTIFY style is used. I have added it to the next version of nsDialogs.nsh. For the current version, you can manually create the list box when the desired flags or add |${LBS_NOTIFY} to the definition of __NSD_ListBox_STYLE in nsDialogs.nsh.code: __________________ |
||
|
|
|
jeffadams78 Junior Member
Registered: Aug 2007 |
LB_GETCURSEL returns the index or "LB_ERR" if no line is selected. Any idea what LB_ERR is? -1? You don't appear to have it defined in nsDialogs.nsh. The index is supposedly 0-based, so 0 is valid (first line). |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
It's -1. __________________ |
||
|
|
|
jeffadams78 Junior Member
Registered: Aug 2007 |
You beat me to the post |
||
|
|
|
jeffadams78 Junior Member
Registered: Aug 2007 |
Any reason why LB_GETTEXT wouldn't work? I'm trying to get the text that the user selected, and I think this should work: |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
Yes, you need System::Call for that. SendMessage alone can't handle strings returning from the message. code: __________________ |
||
|
|
|
jeffadams78 Junior Member
Registered: Aug 2007 |
Hmm, that still didn't work. I've actually changed my mind and decided that the index is fine for my purposes, but thanks for your help. |
||
|
|
|
johnbm Junior Member
Registered: Aug 2007 |
kichik thanks for your help, that worked well and it's pointed me in the right direction on a number of things. I'm now trying to create a combobox with a dropdown style. |
||
|
|
|
klopfdreh Junior Member
Registered: Feb 2008 |
Hello, I defined a Var ListBox and the Compiler compiled it without any errors. Thanks so far! |
||
|
|
|
kichik M.I.A. [NSIS Dev, Mod]
Registered: Oct 2001 |
Use "STR:HELLOOO" instead of just "HELLOOO". __________________ |
||
|
|
|
klopfdreh Junior Member
Registered: Feb 2008 |
Thanks kichik - thats right! Thanks a lot! P.S.: May you are able to help me with DialogsEx? I have another post here with a problem which hasn't been solved yet: Topic: Custom Page with FileSelect-Button URL: URL submitted by user. Last edited by klopfdreh on 02-13-2008 at 10:44 AM |
||
|
|
|
Ivan Andreevich Junior Member
Registered: Nov 2003 |
Ah, this was something I was looking for. |
||
|
|
|
Last Thread Next Thread
|
WINAMP.COM | Forums > Developer Center > NSIS Discussion > nsDialogs - using ${NSD_CreateListBox} |
Forum Rules:
|