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