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 does not Work in Custom Dialog
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
‎Jul 28, 2006
11:27 AM
Cancel Button does not Work in Custom Dialog
Help!
I created a custom dialog, based on the "Cancel" dialog. My custom Dialog is called "AlreadyInstalled". I successfully added the custom dialog to my pre-install wizard sequence, and I successfully added the condition to the dialog to make it appear at the correct time.
When I specialized this dialog, i was able to set its title properties OK and to add the text label properties I wanted. The dialog already comes with the cancel button, which is what I wanted.
However, when testing this dialog during actual installs, the cancel button does not work. If I click it, it changes color (like a button press), but no event seems to be firing.
I could not find anything about the need to hook an event handler into this dialog. I have tried a couple of things, but they do not work. Here is my current code:
_____________________________________
package com.installshield.microsoft_html_help_binaries_for_oid.event.dialog.console;
import java.io.*;
import java.net.*;
import com.installshield.event.*;
import com.installshield.event.ui.*;
import com.installshield.event.wizard.*;
import com.installshield.event.product.*;
import com.installshield.wizard.*;
import com.installshield.wizard.service.*;
import com.installshield.wizard.awt.*;
import com.installshield.wizard.swing.*;
import com.installshield.wizard.console.*;
import com.installshield.product.*;
import com.installshield.util.*;
import com.installshield.ui.controls.*;
import com.installshield.database.designtime.*;
public class PanelAlreadyInstalledConsoleImpl
{
public void queryExitAlreadyInstalled(com.installshield.event.ui.ISDialogQueryContext arg0)
{
SwingWizardUI consoleUI = (SwingWizardUI )arg0.getWizardUI();
consoleUI.cancelAction();
}
}
_____________________________
package com.installshield.microsoft_html_help_binaries_for_oid.event.dialog.swing;
import java.io.*;
import java.net.*;
import com.installshield.event.*;
import com.installshield.event.ui.*;
import com.installshield.event.wizard.*;
import com.installshield.event.product.*;
import com.installshield.wizard.*;
import com.installshield.wizard.service.*;
import com.installshield.wizard.awt.*;
import com.installshield.wizard.swing.*;
import com.installshield.wizard.console.*;
import com.installshield.product.*;
import com.installshield.util.*;
import com.installshield.ui.controls.*;
import com.installshield.database.designtime.*;
public class PanelAlreadyInstalled
{
public void buttonClickedcancel(ISControlContext context) {
SwingWizardUI wizardUI = (SwingWizardUI)context.getWizardUI();
wizardUI.cancelAction();
}
public void initializeUICancel(ISDialogFrameContext context) {
ISFrame frame = context.getISFrame();
ISButton cancelButton = frame.getButton("cancel");
if (cancelButton != null) {
cancelButton.setEnabled(true);
}
}
}
___________________________
Thanks!
John Cook
I created a custom dialog, based on the "Cancel" dialog. My custom Dialog is called "AlreadyInstalled". I successfully added the custom dialog to my pre-install wizard sequence, and I successfully added the condition to the dialog to make it appear at the correct time.
When I specialized this dialog, i was able to set its title properties OK and to add the text label properties I wanted. The dialog already comes with the cancel button, which is what I wanted.
However, when testing this dialog during actual installs, the cancel button does not work. If I click it, it changes color (like a button press), but no event seems to be firing.
I could not find anything about the need to hook an event handler into this dialog. I have tried a couple of things, but they do not work. Here is my current code:
_____________________________________
package com.installshield.microsoft_html_help_binaries_for_oid.event.dialog.console;
import java.io.*;
import java.net.*;
import com.installshield.event.*;
import com.installshield.event.ui.*;
import com.installshield.event.wizard.*;
import com.installshield.event.product.*;
import com.installshield.wizard.*;
import com.installshield.wizard.service.*;
import com.installshield.wizard.awt.*;
import com.installshield.wizard.swing.*;
import com.installshield.wizard.console.*;
import com.installshield.product.*;
import com.installshield.util.*;
import com.installshield.ui.controls.*;
import com.installshield.database.designtime.*;
public class PanelAlreadyInstalledConsoleImpl
{
public void queryExitAlreadyInstalled(com.installshield.event.ui.ISDialogQueryContext arg0)
{
SwingWizardUI consoleUI = (SwingWizardUI )arg0.getWizardUI();
consoleUI.cancelAction();
}
}
_____________________________
package com.installshield.microsoft_html_help_binaries_for_oid.event.dialog.swing;
import java.io.*;
import java.net.*;
import com.installshield.event.*;
import com.installshield.event.ui.*;
import com.installshield.event.wizard.*;
import com.installshield.event.product.*;
import com.installshield.wizard.*;
import com.installshield.wizard.service.*;
import com.installshield.wizard.awt.*;
import com.installshield.wizard.swing.*;
import com.installshield.wizard.console.*;
import com.installshield.product.*;
import com.installshield.util.*;
import com.installshield.ui.controls.*;
import com.installshield.database.designtime.*;
public class PanelAlreadyInstalled
{
public void buttonClickedcancel(ISControlContext context) {
SwingWizardUI wizardUI = (SwingWizardUI)context.getWizardUI();
wizardUI.cancelAction();
}
public void initializeUICancel(ISDialogFrameContext context) {
ISFrame frame = context.getISFrame();
ISButton cancelButton = frame.getButton("cancel");
if (cancelButton != null) {
cancelButton.setEnabled(true);
}
}
}
___________________________
Thanks!
John Cook
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 28, 2006
04:54 PM
I do not think you need to add any code for the canel button in your custom dialog! It's inherited from whatever Category you created your dialog in ie:
Begin
Cancel
Finish
Main
etc...
What happens if you just remove all the code for the Cancel Button and try rerunning it!!!
Regards,
Tom
Begin
Cancel
Finish
Main
etc...
What happens if you just remove all the code for the Cancel Button and try rerunning it!!!
Regards,
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 16, 2006
01:20 PM
I had a problem that sounds similar to this. I fixed it by editing FrameCancel.java and changed cancelAction() to doCancel().