True DataControl 8.0 Reference > True DataControl Control > TData Control Events > ButtonPressed Event |
ButtonPressed Event
Occurs when a control button is pressed.
TData_ButtonPressed (ByVal Button As TrueData60Ctl.TDButtonEnum, Cancel As Boolean)
Arguments: Button identifies the button pressed by the end-user, with the following codes:
0 – tdbButtonFirst
1 - tdbButtonPrevious
2 - tdbButtonNext
3 - tdbButtonLast
4 - tdbButtonNextPage
5 - tdbButtonPrevPage
6 - tdbButtonAdd
7 - tdbButtonDelete
8 - tdbButtonUpdate
9 - tdbButtonCancel
10 - tdbButtonBookmarks
11 - tdbButtonFind
12 - tdbButtonQuery
Cancel is a boolean variable. It is True when the event procedure is called. It can be set to False to cancel the standard action associated with the button.
The ButtonPressed event occurs when a TData control’s button is pressed by the end-user, before the button action is performed. If you prefer to execute your own action instead of the standard one, set Cancel = True, as this will cancel the standard action associated with the button.
For more information, see True DataControl buttons.
See Also