Enabling and Disabling Controls

Dashboard graphics and controls have an Enable property that determines whether, in Run mode, they are enabled or disabled. Users can use enabled objects to trigger events. Users cannot use disabled objects (which are displayed as dimmed) to trigger events. The Enable property is available, for graphics and controls, from the Object tab in the Properties dialog box.

Example—Enable a control

/* Enables controls */
var sect_name=’Dashboard’;
var ctrl_name=’TextBox1’;
ActiveDocument.Sections[sect_name].Shapes[ctrl_name].Enabled = true;

Example—Disable a control

/* Disables controls */
var sect_name=’DashboardDashboard’;
var ctrl_name=’TextBox1’;
ActiveDocument.Sections[sect_name].Shapes[ctrl_name].Enabled = false;