Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   On Selection set bitmap (http://forums.winamp.com/showthread.php?t=282701)

Lunchtray 5th December 2007 19:25

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.

kichik 5th December 2007 20:11

InstallOptions or nsDialogs? How do you set the bitmap?

Lunchtray 5th December 2007 20:27

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

kichik 5th December 2007 20:33

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

Lunchtray 5th December 2007 20:36

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.

kichik 5th December 2007 20:40

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.

Lunchtray 5th December 2007 21:00

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

kichik 5th December 2007 21:03

Examples\nsDialogs.

Lunchtray 5th December 2007 21:10

lol great thanks!

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

kichik 6th December 2007 22:21

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


All times are GMT. The time now is 04:11.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.