Old 9th April 2011, 05:22   #1
hphantom
Junior Member
 
Join Date: Apr 2011
Posts: 15
Adding checkbox to welcome page + remove all subtext

Hi everyone,

I just started learning NSIS, and I wanted to ask a couple of questions.

1 - Is it possible to create a loop to remove/make blank all of the page header subtext, rather than defining: !define MUI_PAGE_HEADER_SUBTEXT '' for each page?
2 - For only the welcome page, where the "Next >" button is all the way at the bottom of the installer, I wanted to create a checkbox to the left of it where the user has an option to check it to go to the advance installation. Is there a way to do this with/out a plugin (am guessing nsDialogs? I haven't quite mastered the .ini file)? I tried ${NSD_CreateCheckbox} but then realised it would only align itself within the main section, rather than going to the footer of the installer.

Thank you very much for any/all input!
hphantom is offline   Reply With Quote
Old 9th April 2011, 06:38   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by hphantom View Post
1 - Is it possible to create a loop to remove/make blank all of the page header subtext, rather than defining: !define MUI_PAGE_HEADER_SUBTEXT '' for each page?
2 - For only the welcome page, where the "Next >" button is all the way at the bottom of the installer, I wanted to create a checkbox to the left of it where the user has an option to check it to go to the advance installation. Is there a way to do this with/out a plugin (am guessing nsDialogs? I haven't quite mastered the .ini file)? I tried ${NSD_CreateCheckbox} but then realised it would only align itself within the main section, rather than going to the footer of the installer.

Thank you very much for any/all input!
1: No, but you can edit the MUI nsh files to change them to "". But why would you want to do this? What's so bad about putting a define in your scripts? They're all compiletime instructions, so it doesn't matter for eventual installer size or whatever.

2: The Next etc buttons are outside of the page space, so to edit it you'll have to edit the interface. You'll need to use resource editor for that (search the forums). But what you're suggesting is not really compliant with how wizard installers are supposed to look, and it's probably much easier to just create a custom page (nsDialogs).
MSG is offline   Reply With Quote
Old 9th April 2011, 14:18   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I'd add the check box to the welcome page itself. You can do this using nsDialogs.

Stu
Afrow UK is offline   Reply With Quote
Old 9th April 2011, 14:43   #4
hphantom
Junior Member
 
Join Date: Apr 2011
Posts: 15
Quote:
Originally Posted by MSG View Post
1: No, but you can edit the MUI nsh files to change them to "". But why would you want to do this? What's so bad about putting a define in your scripts? They're all compiletime instructions, so it doesn't matter for eventual installer size or whatever.
Short version is: very lazy. I figure if all of the sub_text require the same event happening, it'd be a smarter move to just loop through all of them rather than one at a time.


Quote:
Originally Posted by Afrow UK View Post
I'd add the check box to the welcome page itself. You can do this using nsDialogs.
Quote:
Originally Posted by MSG View Post
and it's probably much easier to just create a custom page (nsDialogs).
I'll give this a shot, thought might be something else as a checkbox would be in the center of the page, not at the bottom; sounds like I have some fun ahead of me!

Thanks guys~!
hphantom is offline   Reply With Quote
Old 9th April 2011, 14:55   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You could just destroy those static text controls using DestroyWindow in onGUIInit (set with MUI_CUSTOMFUNCTION_GUIINIT). You can find the control id's by opening up Contrib\UIs\modern.exe (dialog 105) in Resource Hacker.

Stu
Afrow UK is offline   Reply With Quote
Old 10th April 2011, 03:41   #6
hphantom
Junior Member
 
Join Date: Apr 2011
Posts: 15
I made my custom Welcome page which is looking how I want to (custom colors ftw), but I still can't seem to figure out how to get the checkbox to show up instead of the cancel. I tried not showing the cancel and replacing with a checkbox, and didn't figure that out. This is what I have now:
code:
nsDialogs::CreateControl BUTTON ${BS_AUTOCHECKBOX}|${WS_VISIBLE}|${WS_CHILD}|${WS_TABSTOP}|${WS_EX_WINDOWEDGE}|${WS_EX_CLIENTEDGE} 0 100 320 170 15 "Custom installation"



I tried coding the Y to go off the edge of the main section into where the cancel is, but that didn't work either. Any ideas? Thank you~!
hphantom is offline   Reply With Quote
Old 10th April 2011, 06:17   #7
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 552
Send a message via ICQ to T.Slappy
It is impossible to add component apart from inner dialog area!
Window cannot hadle events outside of it's rect. For nsDialogs this rect is 300*140 (ID 1018 or 1044)
Try adding checkbox manually using ResHacker and hide it on next page.

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 10th April 2011, 15:30   #8
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Hence why I said add it to the welcome page itself. The outer dialog is NOT part of the welcome page. You cannot modify it using nsDialogs. As said already, if you must have it next to the navigation buttons (i.e. the outer dialog / $HWNDPARENT) then add it to the UI using resource hacker. Also, when working with nsDialogs, use the macros (i.e. ${NSD_Create*}.

Stu
Afrow UK is offline   Reply With Quote
Old 11th April 2011, 06:53   #9
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 552
Send a message via ICQ to T.Slappy
Quote:
Originally Posted by Afrow UK View Post
Hence why I said add it to the welcome page itself. The outer dialog is NOT part of the welcome page. You cannot modify it using nsDialogs. As said already, if you must have it next to the navigation buttons (i.e. the outer dialog / $HWNDPARENT) then add it to the UI using resource hacker. Also, when working with nsDialogs, use the macros (i.e. ${NSD_Create*}.

Stu
Yop, this is correct way, I said the same in other words, sorry I overlooked your post Afrow UK

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 11th April 2011, 10:56   #10
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
No it's fine; that was just to build upon what we had both said for the purpose of hphantom's understanding .

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
checkbox, nsis, subtext, welcome page

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump