1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
....
Font.Name := self.Font.Name;
Font.Size := self.Font.Size;
Brush.Style := bsClear;
if Self.Caption1 = '' then DrawText(Canevas.Handle, PChar(Self.Caption) , -1, Rect, DT_CENTER or DT_NOPREFIX or DT_VCENTER or DT_SINGLELINE)
else
Begin
DrawText(Canevas.Handle, PChar(Self.Caption1) , -1, Rect, DT_CENTER or DT_NOPREFIX or DT_WORDBREAK);
Rect.Top := Rect.Top + Self.Font.Size + 7;
Pen.Color := clBlack;
MoveTo(Rect.Left+2,Rect.Top);
LineTo(Rect.Right-2,Rect.top);
Rect.Top := Rect.Top + 2;
DrawText(Canevas.Handle, PChar(Self.Caption2) , -1, Rect, DT_NOPREFIX or DT_WORDBREAK);
end;
..... |
Partager