* HeaderCustomDrawDemo use hardcoded color to give consistency across widget sets, change encoding to UTF-8

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1089 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2009-12-26 21:25:45 +00:00
parent c4aabadd57
commit ba56534b9d
2 changed files with 7 additions and 5 deletions

View File

@ -11,7 +11,7 @@ object HeaderOwnerDrawForm: THeaderOwnerDrawForm
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'
OnCreate = FormCreate OnCreate = FormCreate
OnDestroy = FormDestroy OnDestroy = FormDestroy
LCLVersion = '0.9.27' LCLVersion = '0.9.29'
object Label8: TLabel object Label8: TLabel
Left = 12 Left = 12
Height = 83 Height = 83
@ -33,7 +33,6 @@ object HeaderOwnerDrawForm: THeaderOwnerDrawForm
Top = 10 Top = 10
Width = 749 Width = 749
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderStyle = bsSingle
CheckImageKind = ckDarkTick CheckImageKind = ckDarkTick
ClipboardFormats.Strings = ( ClipboardFormats.Strings = (
'CSV' 'CSV'
@ -52,12 +51,14 @@ object HeaderOwnerDrawForm: THeaderOwnerDrawForm
DefaultNodeHeight = 24 DefaultNodeHeight = 24
DefaultText = 'Node' DefaultText = 'Node'
EditDelay = 100 EditDelay = 100
Header.AutoSizeIndex = 0
Header.Background = clBtnShadow Header.Background = clBtnShadow
Header.Columns = < Header.Columns = <
item item
Hint = 'This column is drawn entirely by the tree.' Hint = 'This column is drawn entirely by the tree.'
ImageIndex = 1 ImageIndex = 1
Options = [coDraggable, coEnabled, coResizable, coShowDropMark, coVisible] Options = [coDraggable, coEnabled, coResizable, coShowDropMark, coVisible]
Position = 0
Spacing = -1 Spacing = -1
Text = 'Default drawing' Text = 'Default drawing'
Width = 200 Width = 200
@ -76,7 +77,7 @@ object HeaderOwnerDrawForm: THeaderOwnerDrawForm
end end
item item
Alignment = taCenter Alignment = taCenter
Color = clInfoBk Color = 14811135
Hint = 'Background and text in this column are customized.' Hint = 'Background and text in this column are customized.'
ImageIndex = 0 ImageIndex = 0
Options = [coAllowClick, coDraggable, coEnabled, coResizable, coShowDropMark, coVisible] Options = [coAllowClick, coDraggable, coEnabled, coResizable, coShowDropMark, coVisible]
@ -85,6 +86,7 @@ object HeaderOwnerDrawForm: THeaderOwnerDrawForm
Style = vsOwnerDraw Style = vsOwnerDraw
Width = 350 Width = 350
end> end>
Header.DefaultHeight = 17
Header.Font.Height = -12 Header.Font.Height = -12
Header.Font.Name = 'Arial' Header.Font.Name = 'Arial'
Header.Font.Style = [fsBold] Header.Font.Style = [fsBold]

View File

@ -132,7 +132,7 @@ begin
Width := PaintRectangle.Right - PaintRectangle.Left; Width := PaintRectangle.Right - PaintRectangle.Left;
Height := PaintRectangle.Bottom - PaintRectangle.Top; Height := PaintRectangle.Bottom - PaintRectangle.Top;
TargetRect := Rect(0, 0, Width, Height); TargetRect := Rect(0, 0, Width, Height);
Canvas.Brush.Color := clInfoBk; Canvas.Brush.Color := $E1FFFF;
Canvas.FillRect(TargetRect); Canvas.FillRect(TargetRect);
InflateRect(TargetRect, - 10, -10); InflateRect(TargetRect, - 10, -10);
SourceRect := TargetRect; SourceRect := TargetRect;
@ -148,7 +148,7 @@ begin
TargetCanvas.Font.Size := 60; TargetCanvas.Font.Size := 60;
if IsHoverIndex then if IsHoverIndex then
TargetCanvas.Font.Color := $80FF; TargetCanvas.Font.Color := $80FF;
S := ''; S := 'û';
Size := TargetCanvas.TextExtent(S); Size := TargetCanvas.TextExtent(S);
SetBkMode(TargetCanvas.Handle, TRANSPARENT); SetBkMode(TargetCanvas.Handle, TRANSPARENT);
TargetCanvas.TextOut(PaintRectangle.Left + 10, Paintrectangle.Bottom - Size.cy, S); TargetCanvas.TextOut(PaintRectangle.Left + 10, Paintrectangle.Bottom - Size.cy, S);