Ver Mensaje Individual
  #2  
Antiguo 25-01-2006
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.289
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Antes de seguir por ahí, yo revisaría la ayuda y documentación sobre Frames.
De todas formas si quiere hacer pruebas, haz lo siguiente:

Para la definición de la clase:
Código Delphi [-]
  TEditHours = class(TPanel)
  private
    FEdit1: TEdit;
    FEdit2: TEdit;
    FLabel1: TLabel;
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  published
    property Edit1:TEdit read FEdit1 write FEdit1;
    property Edit2:TEdit read FEdit2 write FEdit2;
    property Label1:TLabel read FLabel1 write FLabel1;
  end;

El Create:

Código Delphi [-]
constructor TEditHours.Create(AOwner: TComponent);
begin

  inherited;

  Self.Height := 23;
  Self.Width := 200;
  Self.Caption := '';

  FLabel1 := TLabel.Create(Self);
  FLabel1.Parent := Self;
  FLabel1.Top := 5;
  FLabel1.Left := 3;
  FLabel1.Width := 20;
  FLabel1.Caption := 'Hora: ';

  FEdit1 := TEdit.Create(Self);
  FEdit1.Parent := Self;
  FEdit1.Top := 1;
  FEdit1.Left := 30;
  FEdit1.Width := 75;

  FEdit2 := TEdit.Create(Self);
  FEdit2.Parent := Self;
  FEdit2.Top := 1;
  FEdit2.Left := 110;
  FEdit2.Width := 75;
end;

Y el Free:

Código Delphi [-]
destructor TEditHours.Destroy;
begin

  FLabel1.Free;
  FEdit1.Free;
  FEdit2.Free;

  inherited;
end;

Funciona en diseño y en ejecución. Y puedes añadir más componentes de forma similar.
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita