Diono
asked on
TTabSheet
How do you get a hold of the canvas of the tabsheet 'header'. By this I mean the little rectangle which 'TabSheet1' is usually written on when a new tabsheet is created. I am not referring to the 'body' of the tabsheet.
Why do you need it? If only to draw, you can set an imagelist on the page control and set the image index property of the appropriate tab sheet.
You can also control the font of the tabsheet individually...
If you need it for some other reason, I believe Mike is right about it's ownership.
You can also control the font of the tabsheet individually...
If you need it for some other reason, I believe Mike is right about it's ownership.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think you're looking for TPageControl.OnDrawTab...
Listening
Because of a lack of infos, let's say that I try a prediction too :
What you need is the function GetHitTestInfoAt(X, Y: Integer): THitTests;
Description
Call GetHitTestInfoAt to determine what portion of the tab control, if any, sits under the point specified by the X and Y parameters.
GetHitTestInfo returns a THitTests type. This set describes the possible elements under the mouse. When interpreting these values, each tab can be considered an “item” of the tab control.
THitTests is a set of THitTest values. THitTest can have any of the following values:
Value Means the point is
htAbove Above the client area.
htBelow Below the client area.
htNowhere Inside the control, but not on an item.
htOnItem On an item, its text, or its bitmap.
htOnButton On a button.
htOnIcon On an icon.
htOnIndent On the indented area of an item.
htOnLabel On a label.
htOnRight On the right side of an item.
htOnStateIcon On a state icon or bitmap associated with an item.
htToLeft To the left of the client area.
htToRight To the right of the client area.
Or maybe You'll like the function IndexOfTabAt(X, Y: Integer): Integer;
So, Who's the most lucky of us ???
What you need is the function GetHitTestInfoAt(X, Y: Integer): THitTests;
Description
Call GetHitTestInfoAt to determine what portion of the tab control, if any, sits under the point specified by the X and Y parameters.
GetHitTestInfo returns a THitTests type. This set describes the possible elements under the mouse. When interpreting these values, each tab can be considered an “item” of the tab control.
THitTests is a set of THitTest values. THitTest can have any of the following values:
Value Means the point is
htAbove Above the client area.
htBelow Below the client area.
htNowhere Inside the control, but not on an item.
htOnItem On an item, its text, or its bitmap.
htOnButton On a button.
htOnIcon On an icon.
htOnIndent On the indented area of an item.
htOnLabel On a label.
htOnRight On the right side of an item.
htOnStateIcon On a state icon or bitmap associated with an item.
htToLeft To the left of the client area.
htToRight To the right of the client area.
Or maybe You'll like the function IndexOfTabAt(X, Y: Integer): Integer;
So, Who's the most lucky of us ???
Hey Ed!
Great point, not something I've ever even *thought* about :)
Gl
Mike
Great point, not something I've ever even *thought* about :)
Gl
Mike
Gl
mike