Archive: Request: Embeddedlists returning index number instead of text


Request: Embeddedlists returning index number instead of text
I've used Embeddedlists to create a dynamic menu at runtinme. Everything works will, but Embeddedlists returns the item's name (that is changing sometimes). I need to get the item number associated with this name instead, so i know what items where selected. Is there an easy way to get these numbers?
I don't like the current way of processing all the names again, it makes sense most times, but sometimes the item number is prefered...

Maybe even better would be an item like Output=13 that i could put into the ini file :)


I'll have a look.

Stu


Here you are.
http://nsis.sourceforge.net/File:EmbeddedLists.zip

It now returns the item number instead of the item text. The setting "ReturnItemText=1" enables the old feature.
I've also implemented code for the tree view control with ParentCheck=1. Child nodes when checked or unchecked now check or uncheck their parent node. My next task would be to implement custom check box images to allow for partially checked check boxes, but this is not really hugely necessary.

Stu


Do you think a right click menu would be a good idea with select all/check all depending on the settings?

Stu


That would be a nice feature, yes.

Anoter question: NSIS can use themes and also different check box types. Is EmbeddedLists able to use the selected themes, ie with !define MUI_COMPONENTSPAGE_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\simple-round2.bmp". If i understood you right, this plugin won't handly any custom graphics at the moment?

Another thing i found is that if Embeddedlists is not called in it's own Page, but as part of a function, ToggleNextButton=1 is active and items are prechecked, the next button still is disabled until i clear one checkbox. This can result in all checkboxes cleared and the next Button active, what is somewhat wrong :)

And thanks for your great help.


Right I'll fix that.

Edit: You have to call it in a Page show function, just like with InstallOptions.

Stu


Here is the new version which adds support for the NSIS components page check bitmap. To use the components page bitmap, you need to have a components page in your installer (duh) but if not, specify a full file path with the UseCheckBitmap INI key.

Both list views and tree views will use the disabled checked and disabled unchecked images. The tree view will also use the partially checked image for parent nodes with ParentCheck=1.

http://nsis.sourceforge.net/File:EmbeddedLists.zip

Edit: Forgot to mention that the new plugin also has a right click menu with select all, unselect all, check all and uncheck all options.

Stu


Thanks a lot for your help and this great plugin, you have helped me a lot - more than you maybe think :)

I'll test it asap.