Each TabSheet of the TAdvPageControl has assigned a different ImageIndex property (both at design-time and at run-time), but the TabSheets all display the same icon both at design-time and at run-time:
Thanks for the hint! Indeed, when setting TabBorder3D = False in the Object Inspector, all the other visual properties of TAdvPageControl are suddenly applied:
TabBorder3D is a property that is inherited from the base control standard VCL TPageControl. So, we cannot change its name. This property controls whether the Windows API accepts a custom drawn tab or not.
For a page control that we built from the ground up and thus has no Windows drawing restrictions and for which we do have a styler component, please have a look at TAdvOfficePager:
I have assigned Hints to the tab-sheets. But unfortunately, the Hint is displayed only AFTER having opened a tab inside the tab-container area, but not on still the closed tab (where it would be more useful):
procedure TForm1.AdvPageControl1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
TabIndex: Integer;
begin
// 1. Find which tab is under the mouse cursor
TabIndex := AdvPageControl1.IndexOfTabAt(X, Y);
if TabIndex >= 0 then
begin
// 2. We are over a tab.
// Check if the hint text is different to avoid flickering.
if AdvPageControl1.Hint <> AdvPageControl1.Pages[TabIndex].Hint then
begin
// Close any currently visible hint so the new one can appear
Application.CancelHint;
// "Borrow" the hint from the TabSheet and assign it to the PageControl
AdvPageControl1.Hint := AdvPageControl1.Pages[TabIndex].Hint;
end;
end
else
begin
// 3. We are NOT over a tab header (mouse is in the page body or empty space).
// Clear the hint so we don't show a stale tab hint.
AdvPageControl1.Hint := '';
end;
end;