added a 3rd option container kind

This commit is contained in:
Basile Burg 2015-02-21 03:56:41 +01:00
parent 55ce01af2d
commit 1d26658a7b
2 changed files with 13 additions and 6 deletions

View File

@ -140,8 +140,10 @@ type
end;
TOptionEditorKind = (oekGeneric, oekForm);
// the option editor use this value as a hint to cast and display an option container
TOptionEditorKind = (oekGeneric, oekForm, oekControl);
// event generated by the option editor and passed to an ICEEditableOptions.
// the oeeChange event only happends if the container is oekGeneric.
TOptionEditorEvent = (oeeCancel, oeeAccept, oeeChange);
(**
* An implementer can expose some options to be edited in a dedicated widget.

View File

@ -119,12 +119,17 @@ begin
dt := PCategoryData(selCat.Selected.Data);
if dt^.container = nil then exit;
case dt^.kind of
oekControl:
begin
TWinControl(dt^.container).Parent := pnlEd;
TWinControl(dt^.container).Align := alClient;
end;
oekForm:
begin
TForm(dt^.container).Parent := pnlEd;
TForm(dt^.container).Align := alClient;
//TForm(dt^.container).BorderIcons:= [];
//TForm(dt^.container).BorderStyle:= bsNone;
TCustomForm(dt^.container).Parent := pnlEd;
TCustomForm(dt^.container).Align := alClient;
TCustomForm(dt^.container).BorderIcons:= [];
TCustomForm(dt^.container).BorderStyle:= bsNone;
end;
oekGeneric:
begin