Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 5

How do I require user to supply a value ?

I have a dialog in my installer that prompts for a server address. How do I make it so they have to enter something before the Next button is enabled ? At this point I'm not really worried about validating the input, just requiring they enter something.
Labels (1)
0 Kudos
(1) Reply
Flexera Alumni

Perhaps borrow the technique used in SdRegisterUser and other dialog boxes, which involves code like this:
if (nMessage = EDITBOX_CHANGE) then
CtrlGetText(szDlg, SD_EDIT_NAME, svName);
StrTrim( svCompany );
StrTrim( svName );
EnableWindow( hwndNext,
StrLengthChars( svName ) && StrLengthChars( svCompany ) );

You can get a copy of the code in the InstallScript view (in InstallShield 2010) by selecting the Dialog Source category and then selecting SdRegisterUser, for example.
0 Kudos