Archive: Some question about nsDialog (with code)


Some question about nsDialog (with code)
Hi folks,

I was going like this...code below...

My questions, i would be very glad, if someone helps me...

1) How can I place a CreateLabel left of CreateText or in other Words, I need a single Line Input with a description before it.

Temperature: <Userinput>
Pressure: <Userinput>
and many paramters more...


2) How can I make the nsDialog windows BIGGER !
I have about 40 Parameters to input, and so I need a bigger field, because I want to do this on one page

Thanks for your answers !

Greetings Jochen Graulberger from Black-Forrest !


!include nsDialogs.nsh
!include LogicLib.nsh

Name nsDialogs
OutFile nsDialogs.exe

XPStyle on

Var Dialog
Var Label
Var Text
Var Text1
Var Pass

Page custom nsDialogsPage nsDialogsPageLeave
Page instfiles

Function nsDialogsPage

nsDialogs::Create /NOUNLOAD 1018
Pop $Dialog

${If} $Dialog == error
Abort
${EndIf}

${NSD_CreateLabel} 0 0 200 20 "Eingabefeld Eins"
Pop $Label

${NSD_CreateText} 0 20 200 20 "Type something here..."
Pop $Text

${NSD_CreateText} 0 50 200 20 "Type something here..."
Pop $Text1

${NSD_CreatePassword} 0 70 200 20 "Type something here..."
Pop $Pass

${NSD_CreateNumber} 0 100 200 20 "Type something here..."
Pop $Pass


nsDialogs::Show

FunctionEnd

Function nsDialogsPageLeave

${NSD_GetText} $Text $0
MessageBox MB_OK "You typed:$\n$\n$0"

FunctionEnd

Section

DetailPrint "hello world"

SectionEnd


Ok, first question I found out. Per x y setting I can "plot" every field where I want. (Even its a unconvenient thing to work with pixels again !)

But question two i need an answer


1. you don't need to use pixels (10). You can also use dialog units (10u) which depend on DPI settings and percentages (10%)..

2. you'll need to use a different UI. MUI is bigger than the standard NSIS, UMUI and ExperienceUI are bigger still. Each impose a bit of their own styles so if you want to make your own UI you'll have to do something like editing the Contrib\UIs\modern.exe with a resource editor and changing things from there