|
|
#1 |
|
Junior Member
Join Date: Jun 2012
Posts: 6
|
Using listboxes in nsDialogs
How do I get a list of items in a listbox? I have tried "SendMessage $VersionListDest ${LB_GETITEMDATA} 0 $VersionUpdateList" and I get back a empty string in VersionUpdateList.
|
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
|
The data is per-item hidden data, it is empty unless you set it yourself. Do you want the text of the items?
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2012
Posts: 6
|
Yes. Actually I really tried using "SendMessage $VersionListDest ${LB_GETTEXT} 0 $VersionUpdateList" with VersionUpdateList always empty.
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jun 2012
Posts: 6
|
using listboxes
Any idea why "SendMessage $VersionListDest ${LB_GETTEXT} 0 $VersionUpdateList" always results with VersionUpdateList always empty?
|
|
|
|
|
|
#5 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
|
A NSIS variable is not the address of a C string buffer, try System::Call 'user32::SendMessage(i$VersionListDest,i${LB_GETTEXT},i 0,t.r1)'
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Jun 2012
Posts: 6
|
Using listboxes in nsDialogs
That doesn't work either. Below is my code, is something still wrong?
nsDialogs::Show System::Call user32::SendMessage(i$VersionListDest,i${LB_GETTEXT},i 0,t.r1) MessageBox MB_OK $r1 |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
t.r1 == $1. You are using $R1 in your message box.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#8 |
|
Major Dude
Join Date: May 2003
Posts: 676
|
a listbox is part of a ini file - you can read it out and separate the values otherwise.
|
|
|
|
|
|
#9 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
|
The question is about nsDialogs, not InstallOptions
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#10 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
|
Does the control even exist after nsDialogs::Show returns?
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#11 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Ah yes you can't handle the controls after ::Show returns because at that point they have all been destroyed. You have to do it in the page's leave callback function.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|