Yathosho
5th September 2002 22:00 UTC
Descriptions / ModernUI
i was reading the example by joost for the ModernUI, and i tried to modify it for one of my own installers. what i couldnt figure is how on tells the installer, to show the descriptions for each section.
if someone could give me an example here, i'd be very thankful!
kichik
5th September 2002 22:21 UTC
What's wrong with the example in the modern UI? You get the section id in $0, compare it to whatever section you want to set the description for, and set it using SendMessage WM_SETTEXT.
matini
6th September 2002 02:37 UTC
Section "BlaBla" bla_section
;some codes
SectionEnd
.
.
.
Function .onMouseOverSection
!insertmacro MUI_DESCRIPTION_INIT
!insertmacro MUI_DESCRIPTION_TEXT 1033 ${bla_section} "This section will install blabla."
!insertmacro MUI_DESCRIPTION_END
FunctionEnd
The example.nsi is a really good example for learning how to use the modern UI. :)
matini
6th September 2002 03:09 UTC
Attached a script. :p
matini
6th September 2002 03:11 UTC
Sorry.fail on the previous post.
Dick4
8th September 2002 17:36 UTC
Basically, what they're saying is true, but you do it like this:
First, your section must have a variable name assigned to it, done like this:
Section "MsgBox 3" sec3
where "sec3" is the variable name
then, later in the code, you give that variable name a description, like this:
Function .onMouseOverSection
!insertmacro MUI_DESCRIPTION_INIT
!insertmacro MUI_DESCRIPTION_TEXT 1033 ${sec1} "This is the first section."
!insertmacro MUI_DESCRIPTION_TEXT 1033 ${sec2} "This is the second section."
!insertmacro MUI_DESCRIPTION_TEXT 1033 ${sec3} "This is the third section."
!insertmacro MUI_DESCRIPTION_END
FunctionEnd
Took me a few minutes to figure it out, as there really isn't any good documentation on how it works (that I found), just an example.
Yathosho
9th September 2002 00:21 UTC
i'm using the latest CVS and get the following message
unknown variable "{sec1}" detected, ignoring
and i used the same code as mentioned above :cry:
Dick4
9th September 2002 03:38 UTC
I'm almost positive its case sensitive, so check that...
can you post your script so we can look at it?
Joost Verburg
9th September 2002 11:06 UTC
Originally posted by killahbite
i'm using the latest CVS and get the following message
unknown variable "{sec1}" detected, ignoring
and i used the same code as mentioned above :cry:
Are you sure you made a section with that variable?
For example: Section "Section 1"
sec1
You should also place the function in the script below the sections.