Difference between revisions of "ATFlatToolbar"

From Lazarus wiki
Jump to navigationJump to search
m (Alextp moved page ATButtonsToolbar to ATFlatToolbar: component is renamed in Github repo)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= About =
 
= About =
  
ATButtonsToolbar is component which creates [[ATButton]]'s on it, this looks like toolbar.
+
ATFlatToolbar is component which creates row of [[ATButton]]'s on it, this looks like toolbar.
  
 
It don't support creating toolbar in IDE design time.
 
It don't support creating toolbar in IDE design time.
 
You need to call methods:
 
You need to call methods:
  
* AddButton: to add usual button, specify here ImageIndex, Caption (caption won't show), Hint, OnClick
+
* AddButton: to add usual button (with caption or not)
* AddDropdown: to add button which looks like arrow-down, specify here PopupMenu, menu will show on click
+
* AddDropdown: to add button with attached drop-down menu
* AddSep: to add button which is disabled and looks like "|" separator line
+
* AddChoice: to add button which acts like a combobox, with Items and ItemIndex
* UpdateControls: this makes items placement, you must call it after changes (also after ImageList size is changed)
+
* AddSep: to add button which looks like "|" separator line
 +
* UpdateControls: this updates buttons placement, you must call it after changes (also after ImageList size is changed)
  
 
[[File:atbuttonstoolbar_demo.png]]
 
[[File:atbuttonstoolbar_demo.png]]
Line 15: Line 16:
 
* Use props ButtonCount and Buttons[i] to get ATButton's from component.
 
* Use props ButtonCount and Buttons[i] to get ATButton's from component.
 
* Use Buttons[i].Free to delete buttons.
 
* Use Buttons[i].Free to delete buttons.
* To make vertical toolbar, set prop KindVertucal to True. In the vertical mode, don't add buttons of kind "dropdown arrow only", they won't paint ok, and it makes no sence.
+
* Use prop Vertical for make vertical layout.
  
 
Author: Alexey Torgashin
 
Author: Alexey Torgashin
Line 25: Line 26:
 
= Download =
 
= Download =
  
Homepage at github is https://github.com/Alexey-T/ATFlatControls
+
GitHub page: https://github.com/Alexey-T/ATFlatControls
 
 
= Requirements =
 
 
 
Lazarus: 1.4.0.
 
 
 
Tested on: Win32 (Windows 7), Linux GTK2 / QT (Ubuntu 14.04), macOS (10.8).
 
  
 +
[[Category:Lazarus]]
 
[[Category:Components]]
 
[[Category:Components]]

Latest revision as of 14:07, 16 December 2021

About

ATFlatToolbar is component which creates row of ATButton's on it, this looks like toolbar.

It don't support creating toolbar in IDE design time. You need to call methods:

  • AddButton: to add usual button (with caption or not)
  • AddDropdown: to add button with attached drop-down menu
  • AddChoice: to add button which acts like a combobox, with Items and ItemIndex
  • AddSep: to add button which looks like "|" separator line
  • UpdateControls: this updates buttons placement, you must call it after changes (also after ImageList size is changed)

atbuttonstoolbar demo.png

  • Use props ButtonCount and Buttons[i] to get ATButton's from component.
  • Use Buttons[i].Free to delete buttons.
  • Use prop Vertical for make vertical layout.

Author: Alexey Torgashin

License

MPL 2.0 or LGPL.

Download

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