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: Re-Enabling Next Button
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
‎Jun 13, 2006
07:16 AM
Re-Enabling Next Button
Hi -
I'm new to InstallShield and I'm having trouble trying to re-enable the 'Next' button after disabling it during initialization. I want to re-enable the 'Next' button after a user types anything within a text box...this is what I currently have:
private ISFrame frame = null;
private ISButton nextButton = null;
public void initializeUIOracleConnectionDialog(com.installshield.event.ui.ISDialogContext arg0)
{
frame = arg0.getISFrame();
nextButton = frame.getButton(NEXT_BUTTON);
nextButton.setEnabled(false);
}
public void keyTypedSrvHostNameTxt(com.installshield.event.ui.ISControlContext arg0)
{
nextButton.setEnabled(true);
nextButton.refreshExtendedProperties();
}
Anybody know what I need to do so as to see the Next button in an enabled state? Any help would be greatly appreciated.
Thanks,
Paul
I'm new to InstallShield and I'm having trouble trying to re-enable the 'Next' button after disabling it during initialization. I want to re-enable the 'Next' button after a user types anything within a text box...this is what I currently have:
private ISFrame frame = null;
private ISButton nextButton = null;
public void initializeUIOracleConnectionDialog(com.installshield.event.ui.ISDialogContext arg0)
{
frame = arg0.getISFrame();
nextButton = frame.getButton(NEXT_BUTTON);
nextButton.setEnabled(false);
}
public void keyTypedSrvHostNameTxt(com.installshield.event.ui.ISControlContext arg0)
{
nextButton.setEnabled(true);
nextButton.refreshExtendedProperties();
}
Anybody know what I need to do so as to see the Next button in an enabled state? Any help would be greatly appreciated.
Thanks,
Paul
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 23, 2006
12:23 PM
Paul,
Give the below a try. It should enable the Next button if there is text in the text field and disable if there is no text.
Tony
public void keyTypedISTextFieldDef1(com.installshield.event.ui.ISControlContext arg0)
{
try
{
ISFrame frame = ((SwingPanel)arg0.getISContainer()).getISFrame();
ISButton nextButton = frame.getButton("next");
ISTextField field = (ISTextField)arg0.getISControl();
String value = field.getText();
if(!value.equals(""))
{
nextButton.setEnabled(true);
}
else
{
nextButton.setEnabled(false);
}
}
catch(Exception e)
{
arg0.getServices().logEvent(this, Log.ERROR, "Caught an exception........");
}
}
Give the below a try. It should enable the Next button if there is text in the text field and disable if there is no text.
Tony
public void keyTypedISTextFieldDef1(com.installshield.event.ui.ISControlContext arg0)
{
try
{
ISFrame frame = ((SwingPanel)arg0.getISContainer()).getISFrame();
ISButton nextButton = frame.getButton("next");
ISTextField field = (ISTextField)arg0.getISControl();
String value = field.getText();
if(!value.equals(""))
{
nextButton.setEnabled(true);
}
else
{
nextButton.setEnabled(false);
}
}
catch(Exception e)
{
arg0.getServices().logEvent(this, Log.ERROR, "Caught an exception........");
}
}
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 25, 2006
09:53 AM
Thanks for the help Tony - alas, it didn't work. The Next button is stuck on disabled still...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 27, 2006
10:24 AM
In case anyone is interested, I finally managed to get this to work. While pulling the last few strands of my hair out, I desperately tried this in an attempt to "jiggle" the button:
if(!value.equals(""))
{
nextButton.setEnabled(true);
nextButton.setEnabled(false);
nextButton.setEnabled(true);
}
Low and behold...it worked. Hope this helps anyone else in the same boat.
Paul
if(!value.equals(""))
{
nextButton.setEnabled(true);
nextButton.setEnabled(false);
nextButton.setEnabled(true);
}
Low and behold...it worked. Hope this helps anyone else in the same boat.
Paul
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)