Sign in Join
Wiki copytemporary

Differences between multi-page controls: what changed

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

OldNewLine
11[![](/wiki-images/9/95/PageControlsComparison.png)](</File:PageControlsComparison.png>)
22
33[](</File:PageControlsComparison.png> "Enlarge")
44
55Example renderings of TPageControl and TTabControl with a TNotebook as a child control. TMemos added as examples (set to borderstyle bsNone, align alClient, font size 14).
66
77[![](/wiki-images/9/98/PageControlsComparison2.png)](</File:PageControlsComparison2.png>)
88
99[](</File:PageControlsComparison2.png> "Enlarge")
1010
1111To emphasize the differences in outline rendering the TMemos have been shrunken in size. Also TPageControl tabs now have glyphs while the TTabControl does not support them.
1212
1313[![](/wiki-images/7/75/Structure1.png)](</File:Structure1.png>)
1414
1515[](</File:Structure1.png> "Enlarge")
1616
1717Structure for the examples used. Note how TNotebook has only one content page (but could provide more) while the TTabControl has four tab buttons (independent controls). TPageControl has one TTabSheet for each page with the content being on the second one in this example.
1818
1919Lazarus (as of version 3.6 at time of writing) provides [[TPageControl]] and separate [[TTabControl]] and [[TNotebook]] controls for multi-page use cases (as Delphi also does).
2020
2121However, even though TNotebook and TTabControl can mimic the behavior and appearance of a TPageControl, there are differences between the controls, which this article will highlight upon.
2222
2323Additionally there are the TExtendedNotebook and TExtendedTabControl on the [[LazControls]] tab, which will be handled in a separate section below.
2424
2525_TPageControl_
2626
2727* [![TTabControl](/wiki-images/1/13/TTabControl-Inspector.png)](</File:TTabControl-Inspector.png> "TTabControl")
2828
2929_TTabControl_
3030
3131* [![TabSheet of TPageControl](/wiki-images/d/dd/TTabSheet-Inspector.png)](</File:TTabSheet-Inspector.png> "TabSheet of TPageControl")
3232
3333_TabSheet of TPageControl_
3434
3535* [![TNotebook](/wiki-images/e/ee/TNotebook-Inspector.png)](</File:TNotebook-Inspector.png> "TNotebook")
3636
3737_TNotebook_
3838
3939* [![TPage of TNotebook](/wiki-images/a/ab/TPage-Inspector.png)](</File:TPage-Inspector.png> "TPage of TNotebook")
4040
4141_TPage of TNotebook_
4242
4343## Specialised controls
4444
4545Lazarus additionally provides the components [TExtendedNotebook](</index.php?title=TExtendedNotebook&action=edit&redlink=1> "TExtendedNotebook \(page does not exist\)") and [TExtendedTabControl](</index.php?title=TExtendedTabControl&action=edit&redlink=1> "TExtendedTabControl \(page does not exist\)") in the [[LazControls]] tab. They are used in the Lazarus IDE itself, but are also available for own projects this way.
4646
4747The main difference for the TExtendedTabControl is that it provides a wrapper for a TToolbar which is displayed right aligned on the tab header level.
4848
4949The TExtendedNotebook however provides an integrated tab header again. In fact making it the same as a TPageControl. It even exposes TTabSheets and not TPage subpage elements. And also renders exactly like a TPageControl with visible borders around the subpages.
5050
5151## Workaround (as of Lazarus 3.6)
5252
5353To have a consistent and clean rendering of the outline frame - or more precise: having no visible outline around the TPageControl - a TNotebook seems to be the way to go. To also have icons in the tab header, you cannot use a TTabControl though - but, you can "misuse" a TPageControl for that. In fact you have to resize the TPageControl in a way that just the header section is visible. Below that you place a TNotebook. Maybe combine both in a TPanel to make things easier. After that you can setup the icons to be used in the TPageControl and you need to add code that reacts on tab changes in the TPageControl and consequently activates the right page in the TNotebook.
5454
5555---
56-*From the Free Pascal wiki, page "Differences between multi-page controls", as the Internet Archive kept it on 2026-01-15. 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).*
56+*From the Free Pascal wiki, page "Differences between multi-page controls", as the Internet Archive kept it on 2026-01-15, last changed on 2024-11-09. 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