我想改变headercontrol的sections里面文字的颜色,怎么办?

ABLE__323 2006-09-12 09:23:12
我想改变headercontrol的sections里面文字的颜色,怎么办?
...全文
142 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
ABLE__323 2006-09-17
  • 打赏
  • 举报
回复
没人说啊,再up一下
ABLE__323 2006-09-16
  • 打赏
  • 举报
回复
没人说啊,up一下
ABLE__323 2006-09-14
  • 打赏
  • 举报
回复
我注意到您是想用hsownerdraw的办法重画,但是有没有办法在hstext的情况下来改变字体颜色呢?
王集鹄 2006-09-13
  • 打赏
  • 举报
回复
object HeaderControl1: THeaderControl
Sections = <
item
ImageIndex = -1
Style = hsOwnerDraw
end
>
OnDrawSection = HeaderControl1DrawSection
end


procedure TForm1.HeaderControl1DrawSection(HeaderControl: THeaderControl;
Section: THeaderSection; const Rect: TRect; Pressed: Boolean);
var
vRect: TRect;
begin
vRect := Rect;
HeaderControl.Canvas.Font.Color := clRed;

DrawText(HeaderControl.Canvas.Handle, PChar(Section.Text),
Length(Section.Text), vRect, DT_CENTER or DT_VCENTER or DT_SINGLELINE);
end;
ABLE__323 2006-09-13
  • 打赏
  • 举报
回复
怎么没有人回答呢?

5,939

社区成员

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

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