mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 23:40:26 +02:00
cocoa: update Clear for ComboBox string list. Patch by Frank. #35404
git-svn-id: trunk@61006 -
This commit is contained in:
parent
e2056f0494
commit
161b58005b
@ -186,6 +186,7 @@ type
|
|||||||
// Pass only 1 owner and nil for the other ones
|
// Pass only 1 owner and nil for the other ones
|
||||||
constructor Create(AOwner: TCocoaComboBox; AReadOnlyOwner: TCocoaReadOnlyComboBox);
|
constructor Create(AOwner: TCocoaComboBox; AReadOnlyOwner: TCocoaReadOnlyComboBox);
|
||||||
procedure Delete(Index: Integer); override;
|
procedure Delete(Index: Integer); override;
|
||||||
|
procedure Clear; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
IComboboxCallBack = interface(ICommonCallBack)
|
IComboboxCallBack = interface(ICommonCallBack)
|
||||||
@ -1163,6 +1164,13 @@ begin
|
|||||||
FReadOnlyOwner.removeItemAtIndex(Index);
|
FReadOnlyOwner.removeItemAtIndex(Index);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCocoaComboBoxList.Clear;
|
||||||
|
begin
|
||||||
|
inherited Clear;
|
||||||
|
if FReadOnlyOwner <> nil then
|
||||||
|
FReadOnlyOwner.removeAllItems;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TCocoaComboBoxList.Create(AOwner: TCocoaComboBox; AReadOnlyOwner: TCocoaReadOnlyComboBox);
|
constructor TCocoaComboBoxList.Create(AOwner: TCocoaComboBox; AReadOnlyOwner: TCocoaReadOnlyComboBox);
|
||||||
begin
|
begin
|
||||||
FOwner := AOwner;
|
FOwner := AOwner;
|
||||||
|
Loading…
Reference in New Issue
Block a user