You cannot use a tooltip because it does not update the tooltip when navigating tabs. So you need to override TJvDockTabPanel.MouseMove () and do something like this:
inherited MouseMove(Shift, X, Y)
Index := GetPageIndexFromMousePost(X, Y)
if (Index > -1) then
begin
Hint := StringReplace(Page.Pages[Index].Caption, '&', '', [rfReplaceAll]);
Application.ActivateHint(ClientToScreen(Point(X, Y)));
end;
JvDockVIDStyle.pas, , , , . , :
unit JvDockExtVIDStyle;
interface
uses JvDockVIDStyle, Classes;
type
TJvDockExtTabPanel = class(TJvDockTabPanel)
protected
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
end;
TJvDockExtVIDTabPageControl = class(TJvDockVIDTabPageControl)
public
constructor Create(AOwner: TComponent); override;
end;
implementation
uses Forms, SysUtils;
{ TJvDockExtVIDTabPageControl }
constructor TJvDockExtVIDTabPageControl.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
//Override TabPanel with our subclassed version
TabPanelClass := TJvDockExtTabPanel;
end;
{ TJvDockExtTabPanel}
procedure TJvDockExtTabPanel.MouseMove(Shift: TShiftState; X, Y: Integer);
var
Index : Integer;
begin
inherited MouseMove(Shift, X, Y);
Index := GetPageIndexFromMousePos(X, Y);
if (Index > -1) then
begin
Hint := StringReplace(Page.Pages[Index].Caption, '&', '', [rfReplaceAll]);
Application.ActivateHint(ClientToScreen(Point(X, Y)));
end;
end;
, , TabDockClass -, . :
DockStyle.TabDockClass := TJvDockExtVIDTabPageControl;
DockServer.DockStyle := DockStyle;
VSNET. VID VSNet , , TJvDockVSNetTabPanel TJvDockTabPanel
JVCL . ShowTabHints - true. .
MyDockStyle.ShowTabHints := True;