Sign in Join
Wiki copytemporary

ATTabs: what changed

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

OldNewLine
11## About
22
33*ATTabs* is a tab-control component for Delphi and Lazarus. It's not replacement for standard tab control, but is alternative one, it has different API. It paints tabs OS-indenendant, using custom drawing on canvas.
44
55Screenshot:
66
7-<figure>
8-<img src="ATTabs_demo.png" title="ATTabs_demo.png" />
9-<figcaption>ATTabs_demo.png</figcaption>
10-</figure>
7+![](/wiki-images/b/b3/ATTabs_demo.png)
118
129Author: Alexey Torgashin
1310
1411## History
1512
1613GitHub repo has the [history.txt file](https://github.com/Alexey-T/ATFlatControls/blob/master/history.txt) which lists all major changes.
1714
1815## Requirements
1916
2017- Lazarus: 1.8+.
2118- Tested on: Windows, Linux GTK2/Qt, macOS.
2219
2320## How to use it like TPageControl
2421
2522Make some new panel, which will be like TPageControl. Place ATTabs on it, make Align=alTop. Now you create several Forms or Frames onto this panel (they have Parent:=Panel1; Align:=alClient;). How to switch these frames on changing tabs?
2623
2724- Add tabs OnChange event handler.
2825- In this event handler: a) hide all frames, b) show frame, which is assigned to current TabIndex.
2926
3027When you create a new tab, you can set its TabObject property. Set TabObject to a frame. When OnChange is called, get TabIndex, call GetTabData() for this index, and read TabObject for this tab. Show the frame, which is stored in this TabObject, hide all others.
3128
3229``` Pascal
3330 var
3431 d: TATTabData;
3532 begin
3633 d:= t.GetTabData(t.TabIndex);
3734 if Assigned(d) then
3835 (d.TabObject as TMyFrame).Show;
3936 end;
4037```
4138
4239## License
4340
4441License: MPL 2.0. Also you can use it under LGPL.
4542
4643## Download
4744
4845ATTabs is merged into ATFlatControls repo: <https://github.com/Alexey-T/ATFlatControls/> . Some wiki documentation is in the "wiki" subfolder of that repo.
4946
5047---
5148*From the Free Pascal wiki, page "ATTabs", as it stood on 2021-03-26 after a change by Alextpp, 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