Ver Mensaje Individual
  #3  
Antiguo 21-09-2010
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.285
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
Yo optaría por hacerlo en el Resize, para que funcione en cualquier momento, tanto en diseño como en ejecución y que se reajuste cuando lo redimensiones.

Código Delphi [-]
...
  protected
    procedure ReSize; override;
...


procedureTmyComponent.ReSize;
begin
  inherited;

  if Assigned(Self.Picture) then begin
    if Assigned(Self.Picture.Graphic) then begin
      Self.Picture.Graphic.Height := Height;
      Self.Picture.Graphic.Width := Width;
    end;
  end;

  Canvas.Pen.Color := clBlack;
  Canvas.Brush.Color := clWhite;
  Canvas.Rectangle(0, 0, Width , Height);

end;

A parte, que es un problema que tienes ahora también, creo que debes "reajustar" el tamaño donde pintas, para ajstarlo al componentes (por eso te está pintando siempre del mismo tamaño).
__________________
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