mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 05:19:31 +02:00
lazcontrols: smallorderedseteditor: added CreateOrderedSetEditor
git-svn-id: trunk@56564 -
This commit is contained in:
parent
fb2f71df0f
commit
f7df76efc0
@ -10,7 +10,7 @@ interface
|
||||
uses
|
||||
CheckBoxThemed, DividerBevel, ExtendedNotebook, ListFilterEdit,
|
||||
ListViewFilterEdit, TreeFilterEdit, ShortPathEdit, LvlGraphCtrl,
|
||||
ExtendedTabControls, SpinEx, LazarusPackageIntf;
|
||||
ExtendedTabControls, SpinEx, SmallOrderedSetEditor, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -72,21 +72,27 @@ type
|
||||
property AvailableItems: TStrings read FAvailableItems write SetAvailableItems;
|
||||
end;
|
||||
|
||||
function ShowListEditor(aCaption: string; Items, AvailableItems: TStrings): TModalResult;
|
||||
function CreateOrderedSetEditor(Items, AvailableItems: TStrings): TSmallOrderedSetEditDlg;
|
||||
function ShowOrderedSetEditor(aCaption: string; Items, AvailableItems: TStrings): TModalResult;
|
||||
|
||||
implementation
|
||||
|
||||
function ShowListEditor(aCaption: string; Items, AvailableItems: TStrings
|
||||
function CreateOrderedSetEditor(Items, AvailableItems: TStrings): TSmallOrderedSetEditDlg;
|
||||
begin
|
||||
Result:=TSmallOrderedSetEditDlg.Create(nil);
|
||||
Result.Items:=Items;
|
||||
Result.AvailableItems:=AvailableItems;
|
||||
Result.Init;
|
||||
end;
|
||||
|
||||
function ShowOrderedSetEditor(aCaption: string; Items, AvailableItems: TStrings
|
||||
): TModalResult;
|
||||
var
|
||||
Dlg: TSmallOrderedSetEditDlg;
|
||||
begin
|
||||
Dlg:=TSmallOrderedSetEditDlg.Create(nil);
|
||||
Dlg:=CreateOrderedSetEditor(Items,AvailableItems);
|
||||
try
|
||||
Dlg.Caption:=aCaption;
|
||||
Dlg.Items:=Items;
|
||||
Dlg.AvailableItems:=AvailableItems;
|
||||
Dlg.Init;
|
||||
Result:=Dlg.ShowModal;
|
||||
if Result=mrOK then
|
||||
Items.Assign(Dlg.Items);
|
||||
|
Loading…
Reference in New Issue
Block a user