Skip to content
⌘ NSIS Forum Archive

Custom Page with Checkboxes to Scroll

17 posts

HaMsTeYr#

Custom Page with Checkboxes to Scroll

I know that this question MAY have been answered before, but the last correspondence was in 2002 and I'm wondering if things may have changed since then.

What I'm looking for is essentially this:



Something did I did before, using a custom page, that dynamically writes the checkboxes on the page via the files of that extension in a certain folder. The limitation of this however, is that I can only have 20 on screen at one time, and that is certainly an issue for me.

What I'm asking is this: Is there anyway I can display a near infinite number of this in a single NSIS page, through scrolling or any other methods? I'm trying to figure this out but nothing comes to mind.

Help would be greatly appreciated.
Anders#
There is no scrolling container window implementation for NSIS AFAIK

You could use a ListView with checkboxes but that is a little bit of work, there should be a listview nsh around somewhere, try searching for it...
Yathosho#
Originally Posted by HaMsTeYr View Post
@MSG How would you propose I do that?
NSD_CreateListBox?

anyway, i wanted to point out this installer demands quite a lot from the user. if you can't avoid this, at least consider adding select/deselect all buttons.

also i was wondering why you didn't use the components page for the selection, would've been the easiest way to do it.
HaMsTeYr#edited
lol, I'm not using NSIS as an installer in this case, and in above mentioned case. They're not meant to install things per se.

For example, the application above, was made so that it was easier for me to extract the contents of .u files for Unreal Tournament, where it would do so for only the selected .u files. To do so manually would be using the command line prompt for it all.

I was planning to see if I could make an app installer for Android, where if I pointed to the location of all my APK files, it would automatically select them all, and I could untick the ones I don't want.

It's simpler to say I am using NSIS for more than what it was intended for.

Anyway, I'll have a look at that, thanks.

EDIT: Not really what I'm looking at with ListBoxes, not what I wanted from the interface at least.

Is there anyway to make something like this in NSIS:

Taken from the MSDN, Check Box Lists.

EDIT-2: Case should be closed, no idea why this didn't come up earlier, something written by Afrow-UK before.



Looks like exactly what I need 🙂
minhht#
Did any one use the plugin EmbeddedLists? When i come to the example folder, and compile every example, they still throw out the failure:
Invalid command: EmbeddedLists:😁ialog

Anyone help me to create a list view with checkbox like HaMsTeYr's one?
Anders#
Originally Posted by minhht View Post
Did any one use the plugin EmbeddedLists? When i come to the example folder, and compile every example, they still throw out the failure:
Invalid command: EmbeddedLists:😁ialog

Anyone help me to create a list view with checkbox like HaMsTeYr's one?
It cannot find the plugin, put the dll in the plugin folder or use !addplugindir...
HaMsTeYr#
Hey dude. I got it working quite some time ago. Embedded lists work fine for me, did you install the plugin fine?
minhht#
Originally Posted by HaMsTeYr View Post
Hey dude. I got it working quite some time ago. Embedded lists work fine for me, did you install the plugin fine?
Hi HaMsTeYr, can you guide me to install the EmbeddedList plugin? I copied the folders's content into the corresponding the NSIS folders, the example also. But when I run the examples, they threw the error at the line:

EmbeddedLists:😁ialog `$PLUGINSDIR\ListView_CheckBoxes.ini`

Please help me
HaMsTeYr#
I pretty much got rid of the individual stuff for mine, and made a quick installer for them, that should work.

Try it.
minhht#
I have done what you instructed, but it did not work also.
Can you show me a more simpler example?
Because when I compiled the nsi file, the error occured at the line where contains EmbeddedLists::InitDialog or EmbeddedLists:: Dialog.
I still don't understand why that is.

PS: I think my installation of EmbeddedLists plugin is ok, but there was something wrong in my usage.
HaMsTeYr#
You have tried compiling the examples in the folder yes?

WHat version of nsis are you using? can you check that you have EmbeddedLists.dll in the plugins folder?
minhht#
Originally Posted by HaMsTeYr View Post
You have tried compiling the examples in the folder yes?

WHat version of nsis are you using? can you check that you have EmbeddedLists.dll in the plugins folder?
I'm using NSIS 3.01, and I still have the EmbeddedLists.dll in the Plugin folder.
I compile the C:\Program Files\NSIS\Examples\EmbeddedLists\ListView_CheckBoxes.nsi.
But it doesn't work.
I hope to receive any instruction from you.

By the way, I tried to create my own ListView control via the code below:

Var hCtl_optionDS_lstHookBasedConf
Page custom myPageCreate
Function myPageCreate
nsDialogs::CreateControl ${WC_LISTVIEW} ${WS_CHILD}|${LVS_REPORT}|${LVS_EDITLABELS}|${WS_VISIBLE} ${LVS_EX_CHECKBOXES}|${WS_EX_CLIENTEDGE} 171u 10u 121u 112u "TEST"
Pop $hCtl_optionDS_lstHookBasedConf
SendMessage $hCtl_optionDS_lstHookBasedConf ${LVM_INSERTCOLUMN} 0 "STR:Product"

StrCpy $0 ${SYSSTRUCT_LVITEM_V4} (${LVIF_TEXT},0,0,1,${LVIS_SELECTED},"item1",50,0,0,0,0,0,0,0,0)

SendMessage $hCtl_optionDS_lstHookBasedConf ${LVM_INSERTITEM} 0 $0 $insertedColumn
FunctionEnd
By this way, I can create the listview, but my last command doesn't work, so i can't insert the item into the listview.
HaMsTeYr#
Odd and interesting. The only thing I can think of now is that 3.0 may not be compatible with the plugin.
minhht#
Originally Posted by HaMsTeYr View Post
Odd and interesting. The only thing I can think of now is that 3.0 may not be compatible with the plugin.
Originally Posted by Anders View Post
For 3.0 you must put the dll in the ansi subdirectory inside the plugin directory.
Thank both HaMsTeYr and Anders so much, it works well. Can I ask you a question that we can create a listview as control inside an dialog like treeview in component page or not?