Ver Mensaje Individual
  #2  
Antiguo 03-12-2006
rounin rounin is offline
Miembro
 
Registrado: sep 2005
Posts: 43
Reputación: 0
rounin Va por buen camino
Text Format de DFM no soporta este combinacion.

Hay tres casos (como yo se) de guardar los componentes en DFM
y ningun de ellos puede usarse con DefineProperties:

1) Referencia.
Se guarda como el nombre.
Código Delphi [-]
----------------------
  object Panel1: TPanel
  ..
    PopupMenu = PopupMenu1       {TOtherForm.PopupMenu1}
  ..
  end
----------------------
2) Componente filial (solo TControl)
Se guarda como
Código Delphi [-]
 
----------------------
  object Panel1: TPanel
    ..
    object Button1: TButton    {object/inherited/inline}
      Left = 48
      Top = 56
      ..
    end
    ..
  end
----------------------
3) Subcomponente
Se guarda como serie de propiedades.
No puede tener componentes filial (no tiene mecanismo de guardarlos en DFM).

Código Delphi [-]
----------------------
  object LabeledEdit1: TLabeledEdit
    ..
    EditLabel.Width = 62
    EditLabel.Height = 13
    EditLabel.Caption = 'LabeledEdit1'
    ..
  end
----------------------


En tu caso hay suguientes posibilidades:

1) Crear TMiembro como Subcomponent de TPrincipal.
(Sin DefineProperties)

Código Delphi [-]
 
constructor TPrincipal.Create(aOwner: TComponent);
begin
  inherited;
  FMiembro := TMiembro.Create( Self );
  FMiembro.SetSubcomponent(True);
end;


2) Usar Filer.DefineBinaryProperty en lugar de Filer.DefineProperty.
Datas escribidas por Filer.DefineBinaryProperty no estan combertido en texto.
Responder Con Cita