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.
Archive: Using listboxes in nsDialogs
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.
The data is per-item hidden data, it is empty unless you set it yourself. Do you want the text of the items?
Yes. Actually I really tried using "SendMessage $VersionListDest ${LB_GETTEXT} 0 $VersionUpdateList" with VersionUpdateList always empty.
using listboxes
Any idea why "SendMessage $VersionListDest ${LB_GETTEXT} 0 $VersionUpdateList" always results with VersionUpdateList always empty?
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)'
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
t.r1 == $1. You are using $R1 in your message box.
Stu
a listbox is part of a ini file - you can read it out and separate the values otherwise.
Originally posted by BrummelchenThe question is about nsDialogs, not InstallOptions
a listbox is part of a ini file - you can read it out and separate the values otherwise.
Originally posted by rthawleyDoes the control even exist after nsDialogs::Show returns?
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
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