LCL: Make TComboExItems more Delphi compatible. Rename Add -> AddItem. Remove obsolete delphi conversion. Issue #26755, patch from ocean.

git-svn-id: trunk@46275 -
This commit is contained in:
juha 2014-09-21 17:17:55 +00:00
parent cd5a2ec6c4
commit f980457103
3 changed files with 5 additions and 6 deletions

View File

@ -515,7 +515,6 @@ begin
TheMap:=fReplaceTypes;
MapReplacement('TFlowPanel', 'TPanel');
MapReplacement('TGridPanel', 'TPanel');
MapReplacement('TComboBoxEx', 'TComboBox');
MapReplacement('TRichEdit', 'TMemo'); // or TRichMemo from CRC.
MapReplacement('TDBRichEdit', 'TDBMemo');
MapReplacement('TApplicationEvents','TApplicationProperties');

View File

@ -122,10 +122,10 @@ type
procedure Notify(Item: TCollectionItem; Action: TCollectionNotification); override;
procedure Update(Item: TCollectionItem); override;
public
function Add: TComboExItem; overload;
function Add(const ACaption: string; AImageIndex: SmallInt = -1;
function Add: TComboExItem;
function AddItem(const ACaption: string; AImageIndex: SmallInt = -1;
AOverlayImageIndex: SmallInt = -1; ASelectedImageIndex: SmallInt = -1;
AIndent: SmallInt = -1; AData: TCustomData = nil): TComboExItem; overload;
AIndent: SmallInt = -1; AData: TCustomData = nil): TComboExItem;
function Insert(AIndex: Integer): TComboExItem;
property ComboItems[AIndex: Integer]: TComboExItem read GetComboItems; default;
end;

View File

@ -199,7 +199,7 @@ begin
Result:=TComboExItem.Create(self);
end;
function TComboExItems.Add(const ACaption: string; AImageIndex: SmallInt;
function TComboExItems.AddItem(const ACaption: string; AImageIndex: SmallInt;
AOverlayImageIndex: SmallInt; ASelectedImageIndex: SmallInt; AIndent: SmallInt; AData: TCustomData
): TComboExItem;
begin
@ -316,7 +316,7 @@ begin
FItemsEx.BeginUpdate;
FItemsEx.Clear;
for i:=0 to AItems.Count-1 do
ItemsEx.Add(AItems[i]);
ItemsEx.AddItem(AItems[i]);
FItemsEx.EndUpdate;
end;