Skip to content
⌘ NSIS Forum Archive

How to alignment Label in Custom Page

6 posts

hackthanh#

How to alignment Label in Custom Page

Hi everyone,
I want to align Label CENTRE in Custom Page, Pls give me some instruction to do it.
Thank u very much🙂
jpderuiter#
With nsDialogs you can use NSD_AddStyle:
${NSD_CreateLabel} 20 20 90% 12u "test"
Pop $Label
${NSD_AddStyle} $Label ${SS_CENTER}
hackthanh#
Thank for ur reply!
I use XPUI, Can it do that?

And another problem, In my custom .ini for Custom Page, i used bitmap with Path , but i carry my Setup to another PC, i run the bitmap don't display.
How to fix it?
Thank for reading.
jpderuiter#
Hi,

I'm not familiar with XPUI, so I can't tell.
If it doesn't support nsDialogs, maybe it supports InstallOpionsEx.
With InstallOptionsEx you can use "TxtAlign=CENTER" in the ini file:
[Field 1]
Type=Label
Left=10
Right=-10
Top=90
Bottom=98
TxtAlign=CENTER
Text=This is centered a label...
You may also try UMUI instead of XPUI.
UMIU supports nsdialogs as wel as InstallOptionsEx.

For the bitmap issue:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
hackthanh#
thank you very much, i fixed it.
🙂 Now i want to custom InstFile Page, how to control the Progressbar with nsDialog
Afrow UK#
Actually you could probably have used ${NSD_AddStyle} $Label ${SS_CENTER} for the InstallOptions label. You can get the label's handle from the HWND INI file field or use FindWindow followed by GetDlgItem. Either way, you should switch from InstallOptions to nsDialogs anyway.

Stu