Archive: Validate custom page


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


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)

Thanks, it worked