- This topic has 1 reply, 2 voices, and was last updated 2021-11-12 at 12:37 am by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Home › Forums › Konopka Signature VCL Controls (formerly Raize Components) › RzPageControl: displaying a hint on the tab rect (or image) only
Tagged: TRzPageControl
Hello,
I’m using a TRzPageControl with several tabsheets, which have certain images as tab images. To explain the meaning of those images I’m looking for a way to display a hint on the tab rect (or image) only, not on the tabsheet client area itself.
Is it possible?
Best regads,
Patrick
Hi Patrick,
This is kind of a hack, but it may be good enough for your needs.
Ray
type
TRzPageControlAccess = class( TRzPageControl )
end;
procedure TForm27.FormCreate(Sender: TObject);
begin
Application.OnShowHint := ShowHintHandler;
end;
procedure TForm27.ShowHintHandler( var HintStr: string; var CanShow: Boolean;
var HintInfo: Vcl.Controls.THintInfo);
var
P: TPoint;
Idx: Integer;
TabDataList: TRzTabDataList;
begin
P := HintInfo.CursorPos;
Idx := RzPageControl1.TabAtPos( P.X, P.Y );
if Idx <> -1 then
begin
TabDataList := TRzPageControlAccess( RzPageControl1 ).GetTabDataList;
if P.X < TabDataList.Items[ Idx ].RawRect.Left + 20 then
begin
HintStr := 'Tab Image ' + Idx.ToString;
end
else
begin
HintStr := 'Regular Tab ' + Idx.ToString + ' Hint';
end;
end;
end;
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Stripe is a payment processing platform that enables businesses to accept online payments securely and efficiently.
Service URL: stripe.com (opens in a new window)