DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Event: EventDefaultColCtrlPreSet for XTable

Event: EventDefaultColCtrlPreSet for XTable

Triggers when the user dialog box opens or when the RunDefaultColCtrlPreSet method is used in the user dialog box. You can use this event to configure the controls that are assigned to the columns of an extended table and that are <Default> type. Use the EventColCtrlPreset event to configure the controls that are not <Default> type.

Use this event to initialize the controls in the script context. You also can configure the controls in the Cell type dialog box when you create the user dialog box.

EventDefaultColCtrlPreSet(ByRef This, ByRef Cell, IsInputCell)
This Object that triggers this event.
Cell Control that is assigned to the <Default> column type.
You can use all the properties and methods of the control.
For this parameter you can use CodeCompletion within the event procedure.
IsInputCell Specifies whether you edit the control of the display mode or the control of the entry mode.
Note  This event triggers twice: once for the control of the display mode and once for the control of the entry mode.
Note  Use the dialog box Configure columns to determine the type of the <Default> control. To open this dialog box, select the extended table in the dialog editor and click Columns on the Properties tab. You can assign the following types of controls to a column: Button, CheckBox, ChnComboBox, ChnListBox, ComboBox, EditBox, ListBox, and Text. Refer to the the DIAdem Help for information on the properties and methods of these controls. The control properties, which you also can set in the Cell type dialog box of the extended table, are identified accordingly in the DIAdem help.

The following example fills all the columns of the selection lists that are displayed in the extended table with the selection terms of the enumeration variable ColorLst. The example also specifies blue as the background color for the display mode and red as the background color for the entry mode of the columns.

Sub XTable1_EventDefaultColCtrlPreSet(ByRef This, ByRef Cell, IsInputCell)
  Cell.Items.RemoveAll 
  Call Cell.FillItemsByVar("ColorLst",True)
  If IsInputCell Then
    Cell.BackColor = RGB(255, 0, 0)
  Else
    Cell.BackColor = RGB(0, 0, 255) 
  End If
End Sub 
In This Section
Was this information helpful?