diff --git a/lcl/checklst.pas b/lcl/checklst.pas index be43c86147..18aee15e0f 100644 --- a/lcl/checklst.pas +++ b/lcl/checklst.pas @@ -88,6 +88,7 @@ type property BorderSpacing; property BorderStyle; property Color; + property Columns; property Constraints; property DragCursor; property DragMode; diff --git a/lcl/interfaces/win32/win32winapi.inc b/lcl/interfaces/win32/win32winapi.inc index 542330c20e..aea9490db1 100644 --- a/lcl/interfaces/win32/win32winapi.inc +++ b/lcl/interfaces/win32/win32winapi.inc @@ -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 diff --git a/lcl/interfaces/wince/wincewinapi.inc b/lcl/interfaces/wince/wincewinapi.inc index bd96f6a2a8..21940c14c9 100644 --- a/lcl/interfaces/wince/wincewinapi.inc +++ b/lcl/interfaces/wince/wincewinapi.inc @@ -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.