Sign in Join
Wiki copytemporary

Revision 1 of 2, by Alextp on 12-16-2021. The page as it is now.

ATButton

About

ATButton is OS-independant button component, flat look. Button as usual has Caption, OnClick.

<figure> <img src="atbutton_demo.png" title="atbutton_demo.png" /> <figcaption>atbutton_demo.png</figcaption> </figure>

Author: Alexey Torgashin

Kinds of buttons

Buttons can have these Kind values:

Icon can be set by 2 ways:

To paint also drop-down arrow on the right side, set Arrow=True. To make button with arrow only, set Kind=abuTextOnly and Arrow=True.

Theme

Colors/fonts of all buttons defined by global var, of type like this

pascal
type
  TATButtonTheme = record
    FontName: string;
    FontSize: integer;
    FontStyles: TFontStyles;
    ColorFont,
    ColorFontDisabled,
    ColorBgPassive,
    ColorBgOver,
    ColorBgChecked,
    ColorBgDisabled,
    ColorArrow,
    ColorBorderPassive,
    ColorBorderOver,
    ColorBorderFocused: TColor;
    MouseoverBorderWidth: integer;
    PressedBorderWidth: integer;
    PressedCaptionShiftY: integer;
    PressedCaptionShiftX: integer;
  end;  
  
var
  ATButtonTheme: TATButtonTheme;

License

MPL 2.0 or LGPL.

Download

GitHub repository: https://github.com/Alexey-T/ATFlatControls


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.