mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 13:56:00 +02:00
lcl: publish TCheckListBox.Columns
win32, wince: fix CheckListBox drawing git-svn-id: trunk@15315 -
This commit is contained in:
parent
eb51e62992
commit
452d657a34
@ -88,6 +88,7 @@ type
|
|||||||
property BorderSpacing;
|
property BorderSpacing;
|
||||||
property BorderStyle;
|
property BorderStyle;
|
||||||
property Color;
|
property Color;
|
||||||
|
property Columns;
|
||||||
property Constraints;
|
property Constraints;
|
||||||
property DragCursor;
|
property DragCursor;
|
||||||
property DragMode;
|
property DragMode;
|
||||||
|
@ -218,7 +218,7 @@ var
|
|||||||
WideBuffer: widestring;
|
WideBuffer: widestring;
|
||||||
{$endif}
|
{$endif}
|
||||||
begin
|
begin
|
||||||
Selected := (Data^.itemState AND ODS_SELECTED)>0;
|
Selected := (Data^.itemState and ODS_SELECTED)>0;
|
||||||
Enabled := CheckListBox.Enabled and CheckListBox.ItemEnabled[Data^.itemID];
|
Enabled := CheckListBox.Enabled and CheckListBox.ItemEnabled[Data^.itemID];
|
||||||
|
|
||||||
// fill the background
|
// fill the background
|
||||||
@ -228,11 +228,11 @@ var
|
|||||||
lgBrush.lbColor := Windows.GetSysColor(COLOR_WINDOW);
|
lgBrush.lbColor := Windows.GetSysColor(COLOR_WINDOW);
|
||||||
lgBrush.lbStyle := BS_SOLID;
|
lgBrush.lbStyle := BS_SOLID;
|
||||||
Brush := CreateBrushIndirect(lgBrush);
|
Brush := CreateBrushIndirect(lgBrush);
|
||||||
Windows.FillRect(Data^._HDC, Windows.Rect(Data^.rcItem), Brush);
|
Rect := Data^.rcItem;
|
||||||
|
Windows.FillRect(Data^._HDC, Rect, Brush);
|
||||||
DeleteObject(Brush);
|
DeleteObject(Brush);
|
||||||
|
|
||||||
// draw checkbox
|
// draw checkbox
|
||||||
Rect := Data^.rcItem;
|
|
||||||
InflateRect(Rect, -1, -1);
|
InflateRect(Rect, -1, -1);
|
||||||
Rect.Right := Rect.Left + Rect.Bottom - Rect.Top;
|
Rect.Right := Rect.Left + Rect.Bottom - Rect.Top;
|
||||||
|
|
||||||
@ -242,8 +242,7 @@ var
|
|||||||
|
|
||||||
// draw text
|
// draw text
|
||||||
Rect := Windows.Rect(Data^.rcItem);
|
Rect := Windows.Rect(Data^.rcItem);
|
||||||
Rect.Right := Data^.rcItem.Right;
|
Rect.Left := Rect.Left + Rect.Bottom - Rect.Top + 5;
|
||||||
Rect.Left := Rect.Bottom-Rect.Top + 5;
|
|
||||||
if not Enabled then
|
if not Enabled then
|
||||||
OldColor := Windows.SetTextColor(Data^._HDC, Windows.GetSysColor(COLOR_GRAYTEXT))
|
OldColor := Windows.SetTextColor(Data^._HDC, Windows.GetSysColor(COLOR_GRAYTEXT))
|
||||||
else
|
else
|
||||||
|
@ -173,9 +173,9 @@ var
|
|||||||
Brush := Windows.GetSysColorBrush(COLOR_HIGHLIGHT or SYS_COLOR_INDEX_FLAG)
|
Brush := Windows.GetSysColorBrush(COLOR_HIGHLIGHT or SYS_COLOR_INDEX_FLAG)
|
||||||
else
|
else
|
||||||
Brush := Windows.GetSysColorBrush(COLOR_WINDOW or SYS_COLOR_INDEX_FLAG);
|
Brush := Windows.GetSysColorBrush(COLOR_WINDOW or SYS_COLOR_INDEX_FLAG);
|
||||||
Windows.FillRect(Data^._HDC, Windows.Rect(Data^.rcItem), Brush);
|
|
||||||
|
|
||||||
Rect := Data^.rcItem;
|
Rect := Data^.rcItem;
|
||||||
|
Windows.FillRect(Data^._HDC, Rect, Brush);
|
||||||
|
|
||||||
InflateRect(Rect, -1, -1);
|
InflateRect(Rect, -1, -1);
|
||||||
Rect.Right := Rect.Left + Rect.Bottom - Rect.Top;
|
Rect.Right := Rect.Left + Rect.Bottom - Rect.Top;
|
||||||
|
|
||||||
@ -185,8 +185,7 @@ var
|
|||||||
|
|
||||||
// draw text
|
// draw text
|
||||||
Rect := Windows.Rect(Data^.rcItem);
|
Rect := Windows.Rect(Data^.rcItem);
|
||||||
Rect.Right := Data^.rcItem.Right;
|
Rect.Left := Rect.Left + Rect.Bottom - Rect.Top + 5;
|
||||||
Rect.Left := Rect.Bottom-Rect.Top + 5;
|
|
||||||
|
|
||||||
{ Don't suppose anything about the current background color
|
{ Don't suppose anything about the current background color
|
||||||
or text color. Always set them.
|
or text color. Always set them.
|
||||||
|
Loading…
Reference in New Issue
Block a user