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
- :
- Disabling Controls...
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 12, 2007
03:09 PM
Disabling Controls...
Because of wacky requirement, I need to be able to disable wizardpanel controls from either a custom event or a wizard action... I cant seem to get to an object that returns me the controls. I can loop thru the wizard tree at this point, but thats about it...
Anyone?
Anyone?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 15, 2007
01:39 AM
You could do it with initializeUI to disable components on the wizard panel This gets invoked as soon as the dialog is visited.
If you are an installshield veteran, you probably know this.
If you are an installshield veteran, you probably know this.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 15, 2007
08:46 AM
Yes, I could have but that would require making the change per panel, which would have been a pain... Instead of trying to get the control objects by their panel, I used the database object... For anyone interested heres a snippet...
[CODE]ISDatabase db = arg0.getServices().getISDatabase();
ISDatabaseDef dbDef = db.getDatabaseDef();
ISPanelDef panels[] = dbDef.getPanels();
for ( int x = 0; x < panels.length; x++ )
{
ISControlDef controlDefs[] = panels.getControls();
for ( int k=0; k < controlDefs.length; k++)
{
String controlName = controlDefs.getName();
if ( disabledFields.indexOf(controlName) > -1 )
{
controlDefs.setEnabled(false);
System.out.println("Disabling field: " + controlName);
}
}
}[/CODE]
[CODE]ISDatabase db = arg0.getServices().getISDatabase();
ISDatabaseDef dbDef = db.getDatabaseDef();
ISPanelDef panels[] = dbDef.getPanels();
for ( int x = 0; x < panels.length; x++ )
{
ISControlDef controlDefs[] = panels
for ( int k=0; k < controlDefs.length; k++)
{
String controlName = controlDefs
if ( disabledFields.indexOf(controlName) > -1 )
{
controlDefs
System.out.println("Disabling field: " + controlName);
}
}
}[/CODE]