Event: EventActionDel for XTable
- Updated2024-09-12
- 2 minute(s) read
User dialog boxes > Events > Event: EventActionDel for XTable
Event: EventActionDel for XTable
Triggers in user dialog boxes when <Del> is pressed in the extended table.
The XTable control links default behavior to <Del>. For example, the text in a textbox is deleted automatically from the extended table when <Del> is pressed. You can use the EventActionDel event to modify this behavior: Set the parameter BDone = TRUE to disable the default behavior.
EventActionDel(ByRef This, ByRef BDone)
This | Object that triggers this event. |
BDone | Specifies whether, when <Del> is pressed, the default behavior of the XTable control is to be reestablished after the event is executed. |
![]() | Note The event is not called in the entry mode of a cell. In this case the behavior cannot be modified. |
The following example checks whether cells are selected in the XTable1 extended table. If so, the example assigns the value NoValue to the selected cells in the first selected column. Otherwise, the default behavior of the extended table and the enabled cell is deleted.
Sub XTable1_EventActionDel(ByRef This, ByRef bDone) If This.SelectedElements.Count = 1 Then Dim MySel: Set MySel = This.SelectedElements.Item(1) Dim i, oMyChannel Set oMyChannel = Data.Root.ActiveChannelGroup.Channels(MySel.FirstCol) For i = MySel.FirstRow To MySel.LastRow oMyChannel.Values(i) = NoValue Next Call This.Refresh BDone = TRUE Else BDone = FALSE End If End Sub Sub XTable1_EventValGet(ByRef This, Row, Col, ByRef Cell, IsInputCell) If Row = 0 Then If Col <> 0 Then Cell.Text = ChnName(Col) Else Cell.Text = "" End If Else Select Case Col Case 0 Cell.Text = Row Case Else Cell.Text = Str(Data.Root.ActiveChannelGroup.Channels(Col).Values(Row)) End Select End If End Sub
Procedures
Checking a User Dialog Box Entry | Creating a Dynamic User Dialog Box | Creating a Procedure in the Script of a User Dialog Box | Creating a User Dialog Box without Linking Variables | Creating an Extended Table | Displaying Graphics in Selection Lists | Enabling Controls | Opening the Dialog Editor | Responding to User Entries in User Dialog Boxes | Saving and Restoring the Last Dialog Box Position | Saving Control Groups for User Dialog Boxes | Specifying the Default Button | Tabulator Order in a User Dialog Box | Using a Script to Fill a Selection List | Using Channel Selection Lists | Using Hotkeys in a User Dialog Box | Using the Flex Properties