Archive: On Selection set bitmap


On Selection set bitmap
I've created a custom page with a listbox containing various items. What I can't figure out is how to redraw the page when a user clicks an item in the listbox to display an item in the bitmap field beside it.

I can get the users selection and I can set the bitmap. The issue is redrawing the page/bitmap field on a selection without having to hit the next button.


InstallOptions or nsDialogs? How do you set the bitmap?


I've been using MUI_INSTALLOPTIONS to read/write/display information from the custom ini pages I've made.


And how do you set the bitmap or get notifications of listbox changes?


For the selection in the listbox:
!insertmacro INSTALLOPTIONS_READ $Device "whatever.ini" "Field 2" "State"

To se the bitmap:
!insertmacro MUI_INSTALLOPTIONS_WRITE "whatever.ini" "Field 3" "Text" "C:\locationofimage\bitmap.bmp"

This only gets the information after you hit next though... which is my problem.


Ah, so you don't really get the selection of the user when it happens. I thought you'd surprise me but this can't be done with InstallOptions. With nsDialogs, however, it's possible. You can get notification for selection change of the list box and load and set a new image as a response.


know of any good examples of the use of nsDialogs that i can check out to learn this?


Examples\nsDialogs.


lol great thanks!

Do you use nsDialogs to redraw a page? or just to get actions on the current page without hitting next.


Both. It has ${NSD_OnChange} for selection notification and you can load and display a new image in that function.