Skip to content
⌘ NSIS Forum Archive

nsdialog - NSD_CreateDropList - Set Sizes Question.

6 posts

Sheik#

nsdialog - NSD_CreateDropList - Set Sizes Question.

Hi all,

I have a question about nsdialog when using NSD_CreateDropList...

I want to set the size of the "max" "y" distance that the dialog can go.
ie, when you click on the "Down" button, when it expands, it expands down to a certain "Y" point...

Like with InstallOptions we could do something like:
Type=DropList
Left=225
Top=138
Right=304
Bottom=220

Where the bottom was the "max" height of the dialog when "expanded".

With nsdialog and NSD_CreateDropList, I can't seem to set the "max" "y" size...

For example:

${NSD_CreateDropList} 300 150 150 50 $NSDIALOG_Country

The "50" should specify the "MAX" distance, right?
No matter what I change it to, it seems to not matter...
ie, 16, 50, or 200, they all "expand" to a really long size...

What am I doing wrong?

Thanks!
Scott
pospec#
It works for me...
Sheik#
Ah, that did work.

However, with MUI2, it does not!

Change your script to have this instead:

#!include "nsDialogs.nsh"

!include "MUI2.nsh"
!insertmacro MUI_PAGE_WELCOME
Page custom nsDialogsPage
!insertmacro MUI_PAGE_FINISH

Now the NSD_CreateDropList call appears to completely ignore the "height" parameter, no matter what size I use, from 30 to 300, the size is always way too big, and extends way beyond the bottom of the Wizard page!

I am attaching the quick mod I did to your script.

BTW, thanks for your help so far!
Scott
pospec#
Droplist behavior is very interesting...
Sheik#
Well, I figured out one way to fix it.
I am not convinced its the CORRECT way, however.

In "include\nsDialogs.nsh"

Add:
${CBS_NOINTEGRALHEIGHT} to:
!define __NSD_DropList_STYLE

ie, the full line becomes:

!define __NSD_DropList_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${WS_VSCROLL}|${WS_CLIPCHILDREN}|${CBS_AUTOHSCROLL}|${CBS_HASSTRINGS}|${CBS_DROPDOWNLIST}|${CBS_NOINTEGRALHEIGHT}