lloydtech
17th March 2011 10:00 UTC
Validate custom page
Hi,
I am using nsDialogs custom pages to create a custom page with a text control. The text control reads a "port number" from the user. How can I validate that the user given "port number" is a valid one? If invalid port number is given, how can i make sure that user cannot click "Next" until the correct port is given?
I have a "custompageleave" function...
Thanks,
Lloyd
Yathosho
17th March 2011 11:52 UTC
use an onChange and enable/disable the next button depending on the value of the text control
and make sure to put something like in your custom page
GetDlgItem $NextButton $HWNDPARENT 1 ; next=1, cancel=2, back=3
use EnableWindow to enable/disable the next button (e.g.
EnableWindow $NextButton 1)
lloydtech
17th March 2011 13:16 UTC
Thanks, it worked