Sign in Join
Wiki copytemporary

ATButton: what changed

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

OldNewLine
11# About
22
33ATButton is OS-independant button component, flat look. Button as usual has Caption, OnClick.
44
55- button state can be: usual (default: light gray), mouse-over (light gray), checked (dark gray), disabled (red-gray)
66- buttons have border of 1..n pixels
77- prop Caption
88- prop Checkable means that click toggles Checked
99- prop Focusable means that button can focus (and paint frame of other color if focused)
1010- prop Flat: passive (not under cursor) button don't paint its backgnd and border
1111- prop Kind: button can have several kinds.
1212
13-<figure>
14-<img src="atbutton_demo.png" title="atbutton_demo.png" />
15-<figcaption>atbutton_demo.png</figcaption>
16-</figure>
13+![](/wiki-images/8/88/Atbutton_demo.png)
1714
1815Author: Alexey Torgashin
1916
2017# Kinds of buttons
2118
2219Buttons can have these Kind values:
2320
2421- abuTextOnly: Show caption only.
2522- abuIconOnly: Show icon only.
2623- abuTextIconHorz: Show icon and caption righter it.
2724- abuTextIconVert: Show icon and caption below it.
2825- abuSeparatorHorz: Show horizontal separator line.
2926- abuSeparatorVert: Show vertical separator line.
3027
3128Icon can be set by 2 ways:
3229
3330- prop Images: TImageList; with prop ImageIndex (used first)
3431- prop Picture: TPicture (used if no Images/ImageIndex is set)
3532
3633To paint also drop-down arrow on the right side, set Arrow=True. To make button with arrow only, set Kind=abuTextOnly and Arrow=True.
3734
3835# Theme
3936
4037Colors/fonts of all buttons defined by global var, of type like this
4138
4239``` pascal
4340type
4441 TATButtonTheme = record
4542 FontName: string;
4643 FontSize: integer;
4744 FontStyles: TFontStyles;
4845 ColorFont,
4946 ColorFontDisabled,
5047 ColorBgPassive,
5148 ColorBgOver,
5249 ColorBgChecked,
5350 ColorBgDisabled,
5451 ColorArrow,
5552 ColorBorderPassive,
5653 ColorBorderOver,
5754 ColorBorderFocused: TColor;
5855 MouseoverBorderWidth: integer;
5956 PressedBorderWidth: integer;
6057 PressedCaptionShiftY: integer;
6158 PressedCaptionShiftX: integer;
6259 end;
6360
6461var
6562 ATButtonTheme: TATButtonTheme;
6663```
6764
6865# License
6966
7067MPL 2.0 or LGPL.
7168
7269# Download
7370
7471GitHub repository: <https://github.com/Alexey-T/ATFlatControls>
7572
7673---
7774*From the Free Pascal wiki, page "ATButton", as it stood on 2021-12-16 after a change by Alextp, 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).*
7875Category: Components
7976Category: Lazarus

Back to history