Sign in Join
Wiki copytemporary

TBitBtn: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11**TBitBtn** ![](/wiki-images/a/a0/Tbitbtn.png) is a component that creates a button with a bitmap drawn on its surface. A TBitBtn is a descendant of [[TWinControl]] and is available under the [[Additional tab]] of the [[Component Palette]].
22
33To make usage of standard buttons a bit easier a TBitBtn has a property *Kind* that let you select a buttonkind like *bkOk* to create an \[Ok\] button with text and corresponding picture (accessible as *Glyph* and a modal-result 'mrOk').
44
5-<figure>
6-<img src="component-TBitBtn.png" title="component-TBitBtn.png" />
7-<figcaption>component-TBitBtn.png</figcaption>
8-</figure>
5+![](/wiki-images/9/9f/Component-TBitBtn.png)
96
107Positioning of glyph and caption can be controlled by means of these properties:
118
129- `Layout` is an enumeration of `blGlyphLeft`, `blGlyphRight`, `blGlyphTop` and `blGlyphBottom` which determines whether the glyph will be placed at the left, right, above or below the caption, respectively. Default: `blGlyphLeft`.
1310- `Margin` is the distance between the edge of the button and glyph, in pixels. The value -1 means that the combination of glyph and caption is centered within the button. Default: `-1`.
1411- `Spacing` is the distance between the glyph and the caption, in pixels. The value -1 means that the caption is centered between glyph and button edge. If `Margin` is -1, too, then glyph and caption will be equally distributed within the button area. Default: `4`.
1512
1613If you have several vertically stacked BitBtn components (with `Layout=blGlyphLeft`) on a form and want to left-align glyphs and captions set `Margin` and `Spacing` to some positive value, such as 4.
1714
1815## See also
1916
2017- [[doc:lcl/buttons/tbitbtn.html|TBitBtn doc]]
2118- [[TButton]]
2219- [[TSpeedButton]]
2320- [[TColorButton]]
2421
2522---
2623*From the Free Pascal wiki, page "TBitBtn", as it stood on 2024-03-24 after a change by Ariben, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history