ATButton

From Lazarus wiki
Revision as of 20:30, 1 August 2015 by Alextp (talk | contribs) (Created page with "= About = ATButton is OS-independant button component, flat look. Button as usual has Caption, OnClick. * buttons can be usual (default: light gray), mouse-over (light gray)...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

About

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

  • buttons can be usual (default: light gray), mouse-over (light gray), checked (dark gray), disabled (red-gray)
  • buttons have frame of 1..n pixels
  • prop Checkable means that click toggles Checked
  • prop Focusable means that button can focus (and paint frame of other color if focused)
  • prop Bitmap takes pointer to TBitmap, it don't hold bitmap, only pointer

Author: Alexey Torgashin.

Colors

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

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

License

MPL 2.0 or LGPL.

Download

Homepage at github is https://github.com/Alexey-T/ATButtons

Requirements

Lazarus: 1.4.0.

Tested on: Linux GTK2 (Ubuntu 14.04), Win32 (Win7).