Diono
asked on
Tab Custom Draw
Hi all,
I draw the Tab(the part you click on to select another sheet) as below. Problem is, I can't get it to draw the _ below the shortcut character.
The result is:-
'&Customer'
Thanks,
Dion.
procedure TPupilForm.pcFamDetailsDra wTab(Contr ol: TCustomTabControl;
TabIndex: Integer; const Rect: TRect; Active: Boolean);
var
ARect: TRect;
begin
with Control do
begin
if Active then
Canvas.Brush.Color := RGB(195, 193, 205)
else
Canvas.Brush.Color := clBtnFace;
ARect := Rect;
ARect.Bottom := ARect.Bottom+2;
Canvas.FillRect(ARect);
Canvas.Font.Color := clBlack;
{ make sure that the tab is going to be wide enough. }
Canvas.TextOut(Rect.Left+4 , Rect.Top+4, TPageControl(Control).Page s[TabIndex ].Caption) ;
end;
I draw the Tab(the part you click on to select another sheet) as below. Problem is, I can't get it to draw the _ below the shortcut character.
The result is:-
'&Customer'
Thanks,
Dion.
procedure TPupilForm.pcFamDetailsDra
TabIndex: Integer; const Rect: TRect; Active: Boolean);
var
ARect: TRect;
begin
with Control do
begin
if Active then
Canvas.Brush.Color := RGB(195, 193, 205)
else
Canvas.Brush.Color := clBtnFace;
ARect := Rect;
ARect.Bottom := ARect.Bottom+2;
Canvas.FillRect(ARect);
Canvas.Font.Color := clBlack;
{ make sure that the tab is going to be wide enough. }
Canvas.TextOut(Rect.Left+4
end;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.