Community Forums
Page 3 of 8 FirstFirst 12345 ... LastLast
Results 11 to 15 of 39

Thread: How to disable the Cancel button

  1. #11
    Join Date
    Oct 2007
    Posts
    8

    Unhappy I think that wont work

    Hi henric
    It is not possible to disable cancel button on the installing panel through the way suggested by Yves Kreis.
    because the way Yves Kreis is saying to disable the cancel button will work only for that custom code panel
    and installing panel is not shown as a panel in the installation project(as u have already seen) so u cant substitute it.

    If u find any other way please let me know

  2. #12
    Join Date
    Jul 2007
    Location
    Luxembourg
    Posts
    143
    I still need to solve a problem with my installer, as soon as I am done with it I will try to get the idea I announced working and will let you know about the results... Its Java, everything can be done!

    Best Regards,
    Yvse

  3. #13
    Join Date
    Jul 2007
    Location
    Luxembourg
    Posts
    143
    Good morning,

    Unfortunately it took me longer to test this as I thought; I had to solve important problems first. But nevertheless this one is quite easy:
    a) Use a CustomCodePanel in Pre-Install and store the GUIAccess object in a static variable.
    b) Use a CustomCodeAction as first action during Install step and use the enableExitButton(false) method on the previously stored GUIAccess object.

    Hope this helps.

    Best Regards,
    Yves

  4. #14
    Join Date
    Dec 2007
    Location
    Dubai, UAE
    Posts
    9

    Talking Yes it worked!(98%)



    Hi,
    I was using IA7.5.
    I did the following:
    a) Use a CustomCodePanel in Pre-Install and store the GUIAccess object in a static variable.
    b) Use a CustomCodeAction as first action during Install step and use the enableExitButton(false) method on the previously stored GUIAccess object.

    It's 98% working because during the first 10-15 seconds of the Install step, where is shows:
    "Installing.... Java Runtime Environment", the Cancel button is still enabled. But after that, the cancel/exit button is automatically disabled throughout the rest of the Install step.

    Though in IA 2008 it's not working at all...


    Last edited by cristina; 06-19-2008 at 01:07 AM. Reason: Does not work in IA 2008

  5. #15
    Join Date
    Dec 2007
    Posts
    13

    try withis code

    public class PanelDisableCancel extends CustomCodeAction{

    @Override
    public String getInstallStatusMessage() {
    // TODO Auto-generated method stub
    return null;
    }

    @Override
    public String getUninstallStatusMessage() {
    // TODO Auto-generated method stub
    return null;
    }

    @Override
    public void install(InstallerProxy ruleProxy) throws InstallException {

    setInstallerProxy(ruleProxy);
    GUIAccess gui = (GUIAccess)ruleProxy.getService(GUIAccess.class);
    System.out.println("Haiiiiiiiiiiiiiii");
    System.out.println(gui);
    gui.getFrame().setTitle("new title");

    try{
    gui.setExitButtonEnabled(false);
    }catch (Exception e) {
    e.printStackTrace();
    }
    try{
    gui.setNextButtonEnabled(false);
    }catch (Exception e) {
    e.printStackTrace();
    }
    try{
    gui.setPreviousButtonEnabled(false);
    }catch (Exception e) {
    e.printStackTrace();
    }

    }

    @Override
    public void uninstall(UninstallerProxy arg0) throws InstallException {
    try {
    String installDirStr = arg0.substitute("$USER_INSTALL_DIR$");
    FileService fs = (FileService)arg0.getService(FileService.class);
    File installDir = new File(installDirStr);
    if (installDir.exists())
    fs.deleteDirectory(installDirStr, false,
    true);
    } catch (Exception e) {
    File f = new File("c:\\logUninstall5.txt");
    FileOutputStream fis = null;
    try{
    fis = new FileOutputStream(f);
    fis.write(e.getMessage().getBytes());
    fis.flush();
    fis.close();
    }
    catch (Exception e1) {
    // TODO: handle exception
    }
    }

    }

Page 3 of 8 FirstFirst 12345 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •