mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 02:28:04 +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 BorderStyle;
|
||||
property Color;
|
||||
property Columns;
|
||||
property Constraints;
|
||||
property DragCursor;
|
||||
property DragMode;
|
||||
|
@ -218,7 +218,7 @@ var
|
||||
WideBuffer: widestring;
|
||||
{$endif}
|
||||
begin
|
||||
Selected := (Data^.itemState AND ODS_SELECTED)>0;
|
||||
Selected := (Data^.itemState and ODS_SELECTED)>0;
|
||||
Enabled := CheckListBox.Enabled and CheckListBox.ItemEnabled[Data^.itemID];
|
||||
|
||||
// fill the background
|
||||
@ -228,11 +228,11 @@ var
|
||||
lgBrush.lbColor := Windows.GetSysColor(COLOR_WINDOW);
|
||||
lgBrush.lbStyle := BS_SOLID;
|
||||
Brush := CreateBrushIndirect(lgBrush);
|
||||
Windows.FillRect(Data^._HDC, Windows.Rect(Data^.rcItem), Brush);
|
||||
Rect := Data^.rcItem;
|
||||
Windows.FillRect(Data^._HDC, Rect, Brush);
|
||||
DeleteObject(Brush);
|
||||
|
||||
// draw checkbox
|
||||
Rect := Data^.rcItem;
|
||||
InflateRect(Rect, -1, -1);
|
||||
Rect.Right := Rect.Left + Rect.Bottom - Rect.Top;
|
||||
|
||||
@ -242,8 +242,7 @@ var
|
||||
|
||||
// draw text
|
||||
Rect := Windows.Rect(Data^.rcItem);
|
||||
Rect.Right := Data^.rcItem.Right;
|
||||
Rect.Left := Rect.Bottom-Rect.Top + 5;
|
||||
Rect.Left := Rect.Left + Rect.Bottom - Rect.Top + 5;
|
||||
if not Enabled then
|
||||
OldColor := Windows.SetTextColor(Data^._HDC, Windows.GetSysColor(COLOR_GRAYTEXT))
|
||||
else
|
||||
|
@ -173,9 +173,9 @@ var
|
||||
Brush := Windows.GetSysColorBrush(COLOR_HIGHLIGHT or SYS_COLOR_INDEX_FLAG)
|
||||
else
|
||||
Brush := Windows.GetSysColorBrush(COLOR_WINDOW or SYS_COLOR_INDEX_FLAG);
|
||||
Windows.FillRect(Data^._HDC, Windows.Rect(Data^.rcItem), Brush);
|
||||
|
||||
Rect := Data^.rcItem;
|
||||
Windows.FillRect(Data^._HDC, Rect, Brush);
|
||||
|
||||
InflateRect(Rect, -1, -1);
|
||||
Rect.Right := Rect.Left + Rect.Bottom - Rect.Top;
|
||||
|
||||
@ -185,8 +185,7 @@ var
|
||||
|
||||
// draw text
|
||||
Rect := Windows.Rect(Data^.rcItem);
|
||||
Rect.Right := Data^.rcItem.Right;
|
||||
Rect.Left := Rect.Bottom-Rect.Top + 5;
|
||||
Rect.Left := Rect.Left + Rect.Bottom - Rect.Top + 5;
|
||||
|
||||
{ Don't suppose anything about the current background color
|
||||
or text color. Always set them.
|
||||
|
Loading…
Reference in New Issue
Block a user