cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jweber
Level 6

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?
Labels (1)
0 Kudos
(2) Replies
Praveen_Durbha
Level 6

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.
0 Kudos
jweber
Level 6

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]
0 Kudos