implemented TAnchorsPropertyEditor to show a button to show the anchor editor

git-svn-id: trunk@6751 -
This commit is contained in:
mattias 2005-02-05 16:06:57 +00:00
parent 41efd4176b
commit 2618472530
2 changed files with 28 additions and 3 deletions

View File

@ -161,8 +161,17 @@ type
property Selection: TPersistentSelectionList read FSelection;
end;
{ TAnchorPropertyEditor }
TAnchorPropertyEditor = class(TSetPropertyEditor)
public
function GetAttributes: TPropertyAttributes; override;
procedure Edit; override;
end;
var
AnchorDesigner: TAnchorDesigner;
ShowAnchorDesigner: TNotifyEvent;
implementation
@ -829,7 +838,21 @@ begin
or (TAnchorDesigner.ControlToStr(CurSide.Control)<>FSibling);
end;
{ TAnchorPropertyEditor }
function TAnchorPropertyEditor.GetAttributes: TPropertyAttributes;
begin
Result:=(inherited GetAttributes)+[paDialog];
end;
procedure TAnchorPropertyEditor.Edit;
begin
ShowAnchorDesigner(Self);
end;
initialization
RegisterPropertyEditor(TypeInfo(TAnchors), TControl, 'Anchors',
TAnchorPropertyEditor);
{$I anchoreditor.lrs}
end.

View File

@ -1339,6 +1339,8 @@ begin
with EnvironmentOptions do begin
ObjectInspectorOptions.AssignTo(ObjectInspector1);
end;
ShowAnchorDesigner:=@mnuViewAnchorEditorClicked;
end;
procedure TMainIDE.SetupCompilerInterface;
@ -2440,7 +2442,6 @@ end;
procedure TMainIDE.DoViewAnchorEditor;
var
WasVisible: boolean;
ALayout: TIDEWindowLayout;
begin
if AnchorDesigner=nil then begin
AnchorDesigner:=TAnchorDesigner.Create(OwningComponent);
@ -2449,8 +2450,6 @@ begin
WasVisible:=AnchorDesigner.Visible;
AnchorDesigner.Show;
ALayout:=EnvironmentOptions.IDEWindowLayoutList.ItemByForm(AnchorDesigner);
ALayout.Apply;
if not WasVisible then
AnchorDesigner.ShowOnTop;
end;
@ -11383,6 +11382,9 @@ end.
{ =============================================================================
$Log$
Revision 1.844 2005/02/05 16:06:57 mattias
implemented TAnchorsPropertyEditor to show a button to show the anchor editor
Revision 1.843 2005/02/05 13:33:05 mattias
implemented gtkwidgetset.IsWindowEnabled