This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Cancel button in custom dialog doesnt work
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 18, 2006
09:43 PM
Cancel button in custom dialog doesnt work
I have added a new Cancel dialog based on the Cancel frame, the Cancel button (the only one) on it doesnt work, I need to click the X to close the install wizard. I have created few other custom dialogs, all with the same result. Are suggestions on how to fix this problem? Thx.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 13, 2006
09:11 AM
Make sure custom dialog belongs to separate Frame group. Then add following code to Swing event of Frame. In this case I only support Back and Cancel. Same way you can add code for Next Button if you wish.
public void buttonClickedback(com.installshield.event.ui.ISControlContext arg0)
{
SwingWizardUI wizardUI = (SwingWizardUI)arg0.getWizardUI();
wizardUI.doPrevious();
}
public void buttonClickedcancel(com.installshield.event.ui.ISControlContext arg0)
{
SwingWizardUI wizardUI = (SwingWizardUI)arg0.getWizardUI();
wizardUI.doCancel();
}
public void initializeUIDisableButton(com.installshield.event.ui.ISDialogFrameContext arg0)
{
ISFrame frame = arg0.getISFrame();
ISButton backButton = frame.getButton("back");
if (backButton != null) {
backButton.setEnabled(true);
}
ISButton cancelButton = frame.getButton("cancel");
if (cancelButton != null) {
cancelButton.setEnabled(true);
}
public void buttonClickedback(com.installshield.event.ui.ISControlContext arg0)
{
SwingWizardUI wizardUI = (SwingWizardUI)arg0.getWizardUI();
wizardUI.doPrevious();
}
public void buttonClickedcancel(com.installshield.event.ui.ISControlContext arg0)
{
SwingWizardUI wizardUI = (SwingWizardUI)arg0.getWizardUI();
wizardUI.doCancel();
}
public void initializeUIDisableButton(com.installshield.event.ui.ISDialogFrameContext arg0)
{
ISFrame frame = arg0.getISFrame();
ISButton backButton = frame.getButton("back");
if (backButton != null) {
backButton.setEnabled(true);
}
ISButton cancelButton = frame.getButton("cancel");
if (cancelButton != null) {
cancelButton.setEnabled(true);
}
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 21, 2008
09:12 PM
I know this is an old thread but I was having this issue as well and didn't feel like creating a new frame - please correct me if I'm wrong but the following seems to work fine.
Select the Cancel Frame and change the buttonClickedCancel method from:
wizardUI.cancelAction() to wizardUI.doCancel()
Regards,
Tom
Select the Cancel Frame and change the buttonClickedCancel method from:
wizardUI.cancelAction() to wizardUI.doCancel()
Regards,
Tom
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)