TPageControl控件问题!!!

xwhope 2005-03-03 11:24:55
PageControl1.TabPosition:=tpLeft;时TabSheet1的Caption文字是竖着排的,如何让文字横着排呢?
谢谢!!!
...全文
106 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
hjf8086 2005-03-03
  • 打赏
  • 举报
回复
TabSheet1.Caption:='T'+#13+'a'+#13+...;
ly_liuyang 2005-03-03
  • 打赏
  • 举报
回复
呵呵,自己去Draw,什么样都不是问题

property OwnerDraw must be set to true

procedure TForm1.PageControl1DrawTab(Control: TCustomTabControl;
TabIndex: Integer; const Rect: TRect; Active: Boolean);
var ARect : TRect;
begin
ARect := Rect;
//clear complete
control.Canvas.brush.Color := clBtnFace;
control.Canvas.FillRect(ARect);
InflateRect(ARect,-2,-2);
//decide the color
if active then
control.Canvas.brush.Color := clRed
else
control.Canvas.brush.Color := clBtnFace;
//paint the tab
control.Canvas.FillRect(ARect);
这里,你喜欢什么样都可以实现的
Control.Canvas.TextOut(ARect.Left+2,ARect.top+2,
TPageControl(Control).Pages[TabIndex].Caption);
end;

http://lysoft.7u7.net
senfore 2005-03-03
  • 打赏
  • 举报
回复
Raize的TRzPagecontrol可以实现
xwhope 2005-03-03
  • 打赏
  • 举报
回复
谢谢hjf8086(hjf)兄,
不过我是要  让文字水平横排 前提是PageControl1.TabPosition:=tpLeft

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧