ComboBox and ListBox size cannot be set. List appears as small line

Posts: 1
Joined: August 30, 2016 - 16:55
ComboBox and ListBox size cannot be set. List appears as small line

Hello,

I am using ver.1.4.2 - NSIS 3.0 final.

I added a combobox to the form. After adding some items to the collection the combo box appears as a small line and cannot be opened (see attachment). The size cannot be set by the NSISDialogDesigner to a larger value.

The code looks like this: 

${NSD_CreateComboBox} 107.95u 120u 204.71u 12.92u ""

After setting the bold value to 120.92u the combobox appears as expected (see attachment). But this must be done in the generated script manually.

${NSD_CreateComboBox} 107.95u 120u 204.71u 120.92u ""

Best Regards,

Fishermans

 

Attachments (Only registered users)
nsisdd1.png
nsisdd2.png
Posts: 1121
Joined: March 25, 2012 - 01:19
Re: ComboBox and ListBox size cannot be set. List appears as small line

Sorry, can't reproduce on my side.

I've created a simple dialog containing only a ComboBox with 2 lines, then built it with NSIS 3.0 final.
The following NSIS script is generated in %TEMP%\NSISDialogDesigner:

; The name of the installer
RequestExecutionLevel user
Name "NSISDialogDesigner-Test"
 
; General Symbol Definitions
!define COMPANY         "CoolSoft"
!define PRODUCT         "CoolSoft NSISDialogDesigner Test"
!define URL             "http://coolsoft.altervista.org/nsisdialogdesigner"
 
VIProductVersion "0.0.0.0"
VIAddVersionKey ProductName "${PRODUCT}"
VIAddVersionKey ProductVersion "0.0.0.0"
VIAddVersionKey CompanyName "${COMPANY}"
VIAddVersionKey CompanyWebsite "${URL}"
VIAddVersionKey FileVersion "0.0.0.0"
VIAddVersionKey FileDescription ""
VIAddVersionKey LegalCopyright ""
 
; installer properties
XPStyle on
 
; The file to write
OutFile "NSISDialogDesigner-test.exe"
SetOverwrite on
 
; MUI Symbol Definitions
!include Sections.nsh
!include MUI2.nsh
!insertmacro MUI_LANGUAGE English
 
; =========================================================
; dialog script begins here
; =========================================================
; =========================================================
; This file was generated by NSISDialogDesigner 1.4.2.0
; http://coolsoft.altervista.org/nsisdialogdesigner
;
; Do not edit it manually, use NSISDialogDesigner instead!
; =========================================================
 
; handle variables
Var hCtl_test
Var hCtl_test_ComboBox1
 
; dialog create function
Function fnc_test_Create
 
  ; === test (type: Dialog) ===
  nsDialogs::Create 1018
  Pop $hCtl_test
  ${If} $hCtl_test == error
    Abort
  ${EndIf}
  !insertmacro MUI_HEADER_TEXT "Dialog title..." "Dialog subtitle..."
 
  ; === ComboBox1 (type: ComboBox) ===
  ${NSD_CreateComboBox} 7.9u 7.38u 280.41u 12.92u ""
  Pop $hCtl_test_ComboBox1
  ${NSD_CB_AddString} $hCtl_test_ComboBox1 "line 1"
  ${NSD_CB_AddString} $hCtl_test_ComboBox1 "line 2"
 
FunctionEnd
 
; dialog show function
Function fnc_test_Show
  Call fnc_test_Create
  nsDialogs::Show
FunctionEnd
 
 
; =========================================================
; dialog script ends here
; =========================================================
 
; show the dialog
!if "" == ""
  Page custom fnc_test_Show
!else
  UninstPage custom fnc_test_Show
!endif
 
Section main
SectionEnd
 
Function .onInit
    InitPluginsDir
!if "" != ""
  ; we're testing the uninstaller, so the installer only writes it and exits
  WriteUninstaller "%UNINSTALLER_FILENAME%"
  Quit
!endif
FunctionEnd
 
Function un.onInit
    InitPluginsDir
FunctionEnd

The resulting .exe works perfectly on both Win7-x64 and Win10-x64, fully updated (see the attached screenshot).
The only way I have to show the issue is to remove all of the items from the Combo, but that's obviously not the case.

Now:

  • what's your OS version?
  • do you by any chance have some particular OS setting, like non standard DPI?
  • could you post your .nsddef file (removing any sensitive data and checking if it still have the issue)?
Attachments (Only registered users)
NSISDialogDesigner-Test.png
warning

Warning, JavaScript is disabled!

JavaScript is not available, maybe because you disabled it globally into your browser settings or you are using an addon like NoScript.

We do not have any dangerous JavaScript running here.
Please enable JavaScript; if you're using NoScript this image will help you adding CoolSoft to your whitelist.

Thanks for your comprehension and enjoy CoolSoft.