The AButton control is a push button that performs a task when the user either clicks the button or presses a key.
|
|
|||
|
|
|
|
The button can have a rectangle, rounded rectangle, ellipse shape as set by the Shape property. The Button is can be drawn with or without border (ambient property). The border is drawn around the Shape.
The bevel area. Inside the border a raised bevel is drawn. The bevel width is specified by the BevelWidth property. The bevel area can be displayed in two positions, Down and Up, corresponding to when a button is pressed or released .
Inside the bevel area is the focus area. This area is used to draw the focus line when the button has the focus.
Inside the focus area is the button inner area. This area is drawn with the button background color and can contain a caption and/or a picture.
The caption is drawn at the position specified by the Alignment property in one of nine places in the inner area. The text font can be set with the Font property and the color of the text with the ForeColor property. The Font3D property can produce a 3D effect on the font. When the button is disabled the text is grayed.
The button can also have a picture. By default, when the Picture property is set the picture is drawn left of the text in a clipped drawing mode. The picture width is calculated by subtracting the text width (and 10% space between the text and picture) from the inner width. The following affect the picture size and position:
The PictureAlignment property (9 places plus 5 text alignment places).
The PictureLeft and PictureTop position properties. When set to -1 (default) the position is calculated automatically.
The PictureWidth and PictureHeight size properties. When set to -1 (default) the size is calculated automatically.
The PictureDrawMode property (Clipped or Stretched).