| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- //
- // This unit is part of the GLScene Engine, http://glscene.org
- //
- unit XCollectionRegister;
- (* Register TXCollection property editor *)
- interface
- {$I GLScene.inc}
- uses
- System.Classes,
- XCollection,
- DesignEditors,
- DesignIntf;
- type
- TXCollectionProperty = class(TClassProperty)
- public
- function GetAttributes: TPropertyAttributes; override;
- procedure Edit; override;
- end;
- procedure Register;
- // ------------------------------------------------------------------
- implementation
- // ------------------------------------------------------------------
- uses
- FXCollectionEditor;
- //----------------- TXCollectionProperty ------------------------------------
- function TXCollectionProperty.GetAttributes: TPropertyAttributes;
- begin
- Result:=[paDialog];
- end;
- procedure TXCollectionProperty.Edit;
- begin
- with XCollectionEditorForm do begin
- SetXCollection(TXCollection(GetOrdValue), Self.Designer);
- Show;
- end;
- end;
- procedure Register;
- begin
- RegisterPropertyEditor(TypeInfo(TXCollection), nil, '', TXCollectionProperty);
- end;
- // ------------------------------------------------------------------
- initialization
- // ------------------------------------------------------------------
- // class registrations
- end.
|