K king_213 Unregistered / Unconfirmed GUEST, unregistred user! 2007-03-23 #1 请问如何利用控件里的canvas使得控件里的文字部分变色??
H hsgrass Unregistered / Unconfirmed GUEST, unregistred user! 2007-03-23 #2 procedure TForm1.lv1CustomDrawItem(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean); begin if odd(item.Index) then sender.Canvas.font.Color := clred; end; // 其它控件可能需要重画
procedure TForm1.lv1CustomDrawItem(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean); begin if odd(item.Index) then sender.Canvas.font.Color := clred; end; // 其它控件可能需要重画
K king_213 Unregistered / Unconfirmed GUEST, unregistred user! 2007-03-23 #4 如果是dbgrid一个格子里的内容 该如何画???请高手帮忙!!!
H hsgrass Unregistered / Unconfirmed GUEST, unregistred user! 2007-03-23 #5 label1.font.color = clred 使用它的字体属性阿
R Rainstorey Unregistered / Unconfirmed GUEST, unregistred user! 2007-03-23 #7 type tmylabel=class(tlabel) protected procedure paint;override; ...... procedure tmylabel.paint; begin canvas.pen.color:=clred;//变色 canvas.drawtext('部分文字'); canvas.pen.color:=clbtntext; canvas.drawtext('正常文字'); .......... ........... end;
type tmylabel=class(tlabel) protected procedure paint;override; ...... procedure tmylabel.paint; begin canvas.pen.color:=clred;//变色 canvas.drawtext('部分文字'); canvas.pen.color:=clbtntext; canvas.drawtext('正常文字'); .......... ........... end;
K king_213 Unregistered / Unconfirmed GUEST, unregistred user! 2007-03-24 #8 我用的是cxgrid能不能把代码写的具体一点???谢谢!!!