Archive: Show a picture under a droplist


Show a picture under a droplist
Hi

I've make a droplist (in a custom page) where the user can choose a patch there are three possibilitys

Low
Middle
Extrem

Now i would that when the user choose as example

Low

the picture 1.bmp will be shown (the preview should be under the droplist)

When he choose Middle the picture 2.bmp will be shown.

Galil has write me this link

http://forums.winamp.com/showthread....hreadid=244895

I've try very long to insert the code for the picture in my .nsi but it doesn't work.

Could anybody help me and write the code for the picture in my patch.nsi?

It would be very friendly from you.
Thank you

Here is the Patch.nsi without the code for the picture:


copied from IO documentation:
"TEXT=For icon and bitmaps control this specifies the path to the image."
you have to extract the bmp to $PLUGINSDIR and specify it's path on text entry of image control. i.e.
[field 2]
Type=Bitmap
Text=$PLUGINSDIR\mybitmap.bmp
Left=60
Right=120
Top=20
Bottom=80


Hi,
thx red wine for the help.

It works .. i see now a picture in the custom page..

But it should be that a picture is only shown when the user choose something in a droplist from this custom page.

When he choose as example Low in the droplist the picture 1.bmp will be shown.

When he choose Middle in the droplist the picture 2.bmp will be shown.

Could anybody say me how I can do this?

I hope you understand what I mean.. my english isn't very good.


make the droplist flags=NOTIFY and in your IO page leave function check the state and rewrite the image text= to point to the other bitmap.
See included IO example testnotify.nsi to find out how to manage the NOTIFY flag and use it to change controls


Hi,
Please help me again:

I've try it now very long but it will not work. I don't understand how i can do it that the picture will chagne when I choose some other point in the drop list.

Can you write me please how i can do this? Perhaps you could insert the code in my patch.nsi?

Please


Once you have callback functions you can add and change image using EBanner plug-in.


Hi, I already use the ebanner plug-in for my install page and it works very good. But i don't understand how i can use it for my custom page :(

I've make now a "patch.nsi" where the picture is always shown.

Could anybody help me and say me how i can make it, that the picture is only show when one choose a selection in the droplist.

Here is the code from the patch.nsi:

;Configuration
;--------------------------------

; Compressor
SetCompressor zlib

;Don't Display CRC
CRCCheck off

; Define your settigs
!define APPNAME "Patch"
!define APPNAMEANDVERSION "Patch"

; Reinstaller/Uninstaller End

; Main Install settings
Name "${APPNAMEANDVERSION}"
InstallDir "Choose a Folder"
DirText "Please select a folder"
InstallDirRegKey HKLM "Software\${APPNAME}" ""
OutFile "Patch.exe"

; ReserveFiles
ReserveFile "patch.ini"
ReserveFile "patch.bmp"

; Settings
ShowInstDetails nevershow
ShowUninstDetails hide

!include "MUI.nsh"
!include "Sections.nsh"
!include "LogicLib.nsh"
!include "WinMessages.nsh"

!define MUI_COMPONENTSPAGE_SMALLDESC

; Pages
!insertmacro MUI_PAGE_WELCOME
Page custom PatchPage
!insertmacro MUI_PAGE_FINISH

;--------------------------------
; Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------

;--------------------------------
; Installer Sections

Section "Patch" Section1

; Set Section properties
SetOverwrite on

; Details
SetDetailsPrint textonly
DetailPrint "Install Patch..."
SetDetailsPrint listonly

SectionEnd

; Modern install component descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} "Example"
!insertmacro MUI_FUNCTION_DESCRIPTION_END

;Functions
Function .onInit

!insertmacro MUI_INSTALLOPTIONS_EXTRACT "patch.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "patch.bmp"

WriteINIStr $PLUGINSDIR\patch.ini "Field 2" "Text" $PLUGINSDIR\patch.bmp

FunctionEnd

; Copy Netsettings
Function PatchPage

!insertmacro MUI_INSTALLOPTIONS_DISPLAY "patch.ini"

FunctionEnd


and this is my patch.ini with the picture:

Why nobody helps me :(


Why nobody helps me
I guess you mean why nobody does not write the script for you...
Well, I think this is not right, you'll never learn NSIS by this way :-)
After all, NSIS is interesting and has a lot of fun :-)

I've realy try to understand the testnotify.nsi in the example folder but all what i've try was wrong. It has never works.

Without help I don't understand it..

And if somebody could write me the script i could lern how it works and the next time i would know how i can do a script like this.

I hope you understand me.

It's very difficult to works with nsis if the english isn't very good.