Old 31st July 2019, 11:35   #1
DivyaArun
Junior Member
 
Join Date: Jul 2019
Posts: 30
How to move the Licence text box to top in NSIS

Hi,

I have updated the licence page such that the text on top of the Licence text box now appears along with the text at the bottom. I would like to move the Licence text box to bit upper in order to remove the unwanted space. Please help!!!

Thanks
DivyaArun is offline   Reply With Quote
Old 31st July 2019, 14:37   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,166
How tall should it be? The same size (with more space on the bottom) or a bit taller so the bottom of the control stays in the same place?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 2nd August 2019, 11:20   #3
DivyaArun
Junior Member
 
Join Date: Jul 2019
Posts: 30
Hi,

I have moved the top text "Scroll down or press Page Down... " text to the bottom area along with "If you accept... " such that they are read as 2 lines. Hence there is a lot of blank space in the portion where "Scroll down" text was originally present and Licence text box. I want to reduce this blank area by either moving the Licence text box to bit upper or by increasing the height of Licence text box, whichever is easy. I was thinking to relocate the Licence text box to bit upper.
DivyaArun is offline   Reply With Quote
Old 2nd August 2019, 16:41   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,166
How did you move the top text label? Just use the same method.

Just editing the .exe UI in Resource Hacker and apply it with ChangeUI/MUI_UI is the easy solution. You can also move it at run-time:

Quote:
!include MUI2.nsh
!define MUI_PAGE_CUSTOMFUNCTION_SHOW ModifyLicenseOnShow
!insertmacro MUI_PAGE_LICENSE "${__FILE__}"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE English

Function ModifyLicenseOnShow
System::Call 'USER32::GetWindowRect(p$mui.LicensePage.LicenseText,@r3)' ; NSIS 3+
System::Call '*$3(i.r4, i.r5, i.r6, i.r7)'
IntOp $6 $6 - $4
IntOp $7 $7 - $5
System::Call 'USER32::GetParent(p$mui.LicensePage.LicenseText)p.s'
System::Call 'USER32::MapWindowPoints(p0, ps, p$3, i 1)i.r9'
System::Call '*$3(i.r4, i.r5)'
IntOp $5 0 + 2 ; Adjust these
IntOp $7 $7 + 10 ; if desired
System::Call 'USER32::SetWindowPos(p$mui.LicensePage.LicenseText, p0, i $4, i $5, i $6, i $7, i 0x14)'
FunctionEnd

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 8th August 2019, 11:18   #5
DivyaArun
Junior Member
 
Join Date: Jul 2019
Posts: 30
Quote:
Originally Posted by Anders View Post
How did you move the top text label? Just use the same method.

Just editing the .exe UI in Resource Hacker and apply it with ChangeUI/MUI_UI is the easy solution. You can also move it at run-time:
Hi,

I was able to move the Licence box using the following code

Function LicenseShow

FindWindow $R0 `#32770` `` $HWNDPARENT
GetDlgItem $R0 $R0 1000
nsResize::Set $R0 0 0 100% 180

FunctionEnd
DivyaArun is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

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