Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Disable Next button, using radio buttons


4 replies to this topic

zkhan

zkhan
  • Members
  • 3 posts

Posted 04 February 2002 - 23:02

I am trying to add two radio buttons to a dialog box with values so that you can ONLY click the 'NEXT' button when one of the radios are checked.  I haven't been successful at all since i'm VERY new to this.  The following is all i have so far.
//////////////////////////////////////////////////////////////
Dlg_SdAskOptions:
szMsg = "Select your Connection Type Below.";
szText1 = "HUMCMD.net Dial-up Access";
szText2 = "HUMCMD.net Broadband Access";
bvCheck1 = FALSE;
bvCheck2 = FALSE;
nResult = SdAskOptions(szTitle,szMsg,szText1,szText2,"",0);  
nValue = EXCLUSIVE;  
AskOptions (nValue, szMsg,szText1, bvCheck1,szText2, bvCheck2);

//CtrlSetState (SdAskOptions,bvCheck1,"Select your Connection Type Below.") ;

//if (CtrlSetState (SdAskOptions,bvCheck1, BUTTON_CHECKED) < 0)  then
//MessageBox ("First call to CtrlSetState failed.", SEVERE);  
//endif;

if (bvCheck1 = 0 || bvCheck2 = 0)then
goto Dlg_SdAskOptions;
else

Enable (NEXTBUTTON);
endif;  

if (nResult = BACK) goto Dlg_SdRegisterUser;
////////////////////////////////////////////////////////////////


clvrmnky

clvrmnky
  • Members
  • 27 posts

Posted 05 February 2002 - 00:03

I was trying to find a way to do this with Component Trees, as well.  I'd like Next button greyed-out if no components are check in (say) the Custom Setup tree.

All I do now is loop until at least one component is checked, but this isn't very elegant.

Is there a general-purpose solution to this?


Becky Nichols

Becky Nichols
  • Members
  • 45 posts

Posted 05 February 2002 - 14:51

I third this.  We're working with the same issues.  Need to grey out the next button if the option is not selected in the Options dlg and also, disable it on custom install if nothing is checked.  It would also be nice to be able to grey it out on the modify screen if the user chooses to remove the app.

Anyone have an answer or is this something we should approach InstallShield with, since so many of us are facing the same issues?

Becky


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 09 February 2002 - 09:28

You would have to do this inside the script that drives the dialog box (message handler). Unfortunately in IS6 these scripts are not available in source code. They were in IS5, so for dialogs that exist in IS5 in a similar way you may be able to use these.
The alternatives are either to create a custom dialog from scratch, or use the InstallDialogue tool from http://moonsea.com

nrlaing

nrlaing
  • Full Members
  • 14 posts

Posted 03 October 2008 - 14:35

Is there a way to disable a control in a custom scripted-dialog without re-initializing the dialog? I've found that EnableWindow(hwndControl, FALSE) doesn't immediately work. If I close the dialog, then re-initialize it, then the control will show up disabled.

Unfortunately, this screws up the tab order. Is there any way around this?