In the table dialog I want to hide several fields. I've found the .remove method but when I use it any field I remove is given a default value of zero even if I've already set a default. Is there a way to hide these fields without this happening?
if ( dialogName == 'table' )
{
dialogDefinition.removeContents('advanced');
// Get a reference to the 'Table Info' tab.
var infoTab = dialogDefinition.getContents( 'info' );
var textWidth = infoTab.get('txtWidth');
textWidth['default'] = '400';
// Remove unnecessary widgets from the 'Table Info' tab.
infoTab.remove( 'txtWidth');
infoTab.remove( 'txtHeight');
infoTab.remove( 'txtSummary');
infoTab.remove( 'txtCaption');
infoTab.remove( 'cmbAlign');
infoTab.remove( 'txtBorder');
infoTab.remove( 'selHeaders');
infoTab.remove( 'txtCellSpace');
infoTab.remove( 'txtCellPad');
}
if ( dialogName == 'table' )
{
dialogDefinition.removeContents('advanced');
// Get a reference to the 'Table Info' tab.
var infoTab = dialogDefinition.getContents( 'info' );
var textWidth = infoTab.get('txtWidth');
textWidth['default'] = '400';
// Remove unnecessary widgets from the 'Table Info' tab.
infoTab.remove( 'txtWidth');
infoTab.remove( 'txtHeight');
infoTab.remove( 'txtSummary');
infoTab.remove( 'txtCaption');
infoTab.remove( 'cmbAlign');
infoTab.remove( 'txtBorder');
infoTab.remove( 'selHeaders');
infoTab.remove( 'txtCellSpace');
infoTab.remove( 'txtCellPad');
}