RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBitBtn Class

TBitBtn is a push button control that can include a bitmap on its face.

Pascal
TBitBtn = class(TButton);
C++
class TBitBtn : public TButton;

Buttons

Bitmap buttons exhibit the same behavior as button controls. Use them to initiate actions from forms and dialog boxes. 

Bitmap buttons implement properties that specify the bitmap images, along with their appearance and placement on the button. You can choose from predefined bitmap buttons styles or use your own customized bitmap for the button. Although the button can be associated with only one bitmap, the bitmap (glyph property) can be subdivided into four equal-sized portions, which are displayed based on the state of the button: up, down, disabled, and clicked.  

The Kind property of TBitBtn provides commonly used buttons, such as OK, Cancel, Help, and so on. These predefined button types have corresponding graphical images and default behaviors, so you can easily add them to your application with little or no coding necessary. 

The recommended way to implement the response of other button kinds to user clicks is to assign an action from an action list as the value of the Action property. By setting the Action property, you make the button a client of the action, and the action handles updating the button's properties and responding when the user clicks the button. 

If you are not using the built-in response to a specific kind of button or an action to respond when the user clicks the button, then you can specify the button's response by writing an OnClick event handler. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!