lcl: publish TCheckListBox.Columns

win32, wince: fix CheckListBox drawing

git-svn-id: trunk@15315 -
This commit is contained in:
paul 2008-06-05 14:11:07 +00:00
parent eb51e62992
commit 452d657a34
3 changed files with 8 additions and 9 deletions

View File

@ -88,6 +88,7 @@ type
property BorderSpacing;
property BorderStyle;
property Color;
property Columns;
property Constraints;
property DragCursor;
property DragMode;

View File

@ -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

View File

@ -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.