ReturnPage: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Control user returning to a page)
 
Line 5: Line 5:


== Description ==
== Description ==
ReturnPage macros add the possibility to control if a user is returning to a page or not. THis might be useful if you want to restore controls values (TextBox, CheckBox, ...)
ReturnPage macros add the possibility to control if a user is returning to a page or not. This might be useful if you want to restore controls values (TextBox, CheckBox, ...).


Just include the header file ReturnPage.nsh. It can be included with:
Just include the header file ReturnPage.nsh. It can be included with:

Latest revision as of 14:49, 14 January 2016

Author: sirbabyface (talk, contrib)


Links

ReturnPage.zip (277 bytes)

Description

ReturnPage macros add the possibility to control if a user is returning to a page or not. This might be useful if you want to restore controls values (TextBox, CheckBox, ...).

Just include the header file ReturnPage.nsh. It can be included with:

!include 'ReturnPage.nsh'

On each show function of you custom pages, pre functions, add this line at the top.

${ReturnPage} ''number''

And add this line at the end.

${ReturnPageEnd} ''number''

To check if you are returning to a page, I recommend to also use the LogicLib.

Small example of usage:

${ReturnPage} 1
 
...
 
${If} $ReturnPage1 == false
     # Do Stuff, like initialization of global variables
${EndIf}
 
...
 
${ReturnPageEnd} 1