Archive: Setting section descriptions


Setting section descriptions
Hello, after reading numerous FAQs, the forum rules, Googling, and searching around the NSIS wiki I make this question:

How do I set THIS section description (red, see image):
http://img2.imageshack.us/img2/1763/ex2.png
I managed to put the description in the yellow marked area using

4.7.2.1.6 .onMouseOverSection

This callback is called whenever the mouse position over the sections tree has changed. This allows you to set a description for each section for example. The section id on which the mouse is over currently is stored, temporarily, in $0.

Example:

Function .onMouseOverSection
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R0 $R0 1043 ; description item (must be added to the UI)

StrCmp $0 0 "" +2
SendMessage $R0 ${WM_SETTEXT} 0 "STR:first section description"

StrCmp $0 1 "" +2
SendMessage $R0 ${WM_SETTEXT} 0 "STR:second section description"
FunctionEnd
but I'd rather have it in the propper location.

Winamp installer seems to do it alright
http://img198.imageshack.us/img198/1774/ex1l.png
but I can't seem to find it in the documentation, I know it MUST be somewhere, since its something pretty obvious, but I simply can't.

Any help would be most apreciated.

You want it on the bottom? Add this:

!define MUI_COMPONENTSPAGE_SMALLDESC

Launch NSIS, click Modern UI 2 under Documentation for more settings.


If you want to define the text that appears under "Description" read the "Components page descriptions" section of the Modern UI manual. Several of the example scripts which come with NSIS use component descriptions, e.g. Examples\Modern UI\Basic.nsi


@redxii: Thats not what I meant, I just wanted to set a description, not to change the interface layout, thanks aniways.

@pengyou: Thats exactly what I was looking for, seems like I was missing one macro to make it work, after looking into your example and the documentation you pointed I finally managed to make it work. Thanks!

Issue solved, if a mod wants to close the thread, so be it.