carbon: Patch 30497Fix TListBox.ItemHeight

git-svn-id: trunk@53770 -
This commit is contained in:
sekelsenmat 2016-12-23 19:37:49 +00:00
parent f2d36f17ab
commit ea61d1502b

View File

@ -273,6 +273,7 @@ type
procedure DrawItem(AIndex: Integer; AState: DataBrowserItemState); override;
procedure SelectionChanged(AIndex: Integer; ASelect: Boolean); override;
procedure FocusedChanged({%H-}AIndex: Integer); override;
procedure SetFont(const AFont: TFont); override;
end;
{ TCarbonCheckListBox }
@ -1944,7 +1945,8 @@ begin
ShowColumnHeaders(False);
ShowCheckboxes(False);
ShowAsList(True);
SetItemsHeight((LCLObject as TCustomListBox).ItemHeight);
if (LCLObject as TCustomListBox).Style = lbOwnerDrawFixed then
SetItemsHeight((LCLObject as TCustomListBox).ItemHeight);
SetRowSelect(True);
SetScrollBars(ssAutoVertical);
SetSelectionMode((LCLObject as TCustomListBox).ExtendedSelect,
@ -2011,6 +2013,13 @@ begin
LCLSendSelectionChangedMsg(LCLObject);
end;
procedure TCarbonListBox.SetFont(const AFont: TFont);
begin
inherited SetFont(AFont);
if (LCLObject as TCustomListBox).Style = lbOwnerDrawFixed then
SetItemsHeight((LCLObject as TCustomListBox).ItemHeight);
end;
{ TCarbonCheckListBox }
procedure TCarbonCheckListBox.CreateWidget(const AParams: TCreateParams);