ComponentOne True DataControl 8.0
Invoking and Substituting Button Functions in Code

The ButtonPressed event occurs when a button is pressed by the end-user, before the actual button action is performed. If you prefer to execute your own action instead of the standard one, do so in the ButtonPressed event, and set the Cancel argument to True, which will cancel the standard action associated with the button.

The PressButton method simulates pressing a button, and performing the button action. It can be used even if the button is invisible or disabled. The ButtonPressed event is not fired by a PressButton call.

The PressButton method is especially useful when you want to benefit from the standard True DataControl dialogs, Find and Bookmarks, but don’t want them invoked with standard buttons. You can open the standard dialogs calling

Example Title
Copy Code
TData1.PressButton tdbButtonFind

and

Example Title
Copy Code
TData1.PressButton tdbButtonBookmarks

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback