Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 12-04-2012
Avatar de defcon1_es
defcon1_es defcon1_es is offline
Miembro
 
Registrado: mar 2004
Ubicación: Cuenca - España
Posts: 533
Poder: 23
defcon1_es Va por buen camino
Hola.
Creo que no se ve la imagen porque no has sobrecargado el método Paint del TRoundBtn,
y se ejecuta el de la clase TShape, que no tiene en cuenta tu imagen

Prueba algo asi y adáptalo a las necesidades de tu clase.

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

procedure TRoundBtn.Paint;
var
  X, Y, W, H, S: Integer;
begin
  with Canvas do
  begin
    Pen := FPen;
    Brush := FBrush;
    X := Pen.Width div 2;
    Y := X;
    W := Width - Pen.Width + 1;
    H := Height - Pen.Width + 1;
    if Pen.Width = 0 then
    begin
      Dec(W);
      Dec(H);
    end;
    if W < H then S := W else S := H;
    if FShape in [stSquare, stRoundSquare, stCircle] then
    begin
      Inc(X, (W - S) div 2);
      Inc(Y, (H - S) div 2);
      W := S;
      H := S;
    end;
    case FShape of
      stRectangle, stSquare:
        Rectangle(X, Y, X + W, Y + H);
      stRoundRect, stRoundSquare:
        RoundRect(X, Y, X + W, Y + H, S div 4, S div 4);
      stCircle, stEllipse:
        Ellipse(X, Y, X + W, Y + H);
    end;
//El código anterior es el que tiene la clase TShape (Copy&Paste)
    if Assinged(FImagen) then
      StretchDraw(Self.GetClientRect,FImagen.Bitmap);
  end;
end;
__________________
Progress Openedge
https://abevoelker.com/progress_open...dered_harmful/


Delphi forever...
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Texto Circular Marcb3 Varios 4 29-02-2008 21:39:26
Componente Shape con imagen y texto canelita Varios 1 13-01-2008 06:10:37
Sobreponer Imagen Circular Deiv HTML, Javascript y otros 2 28-01-2007 15:46:11
Referencia circular Enan0 Varios 3 31-10-2006 22:56:26
referencia circular melon OOP 1 16-04-2006 02:13:00


La franja horaria es GMT +2. Ahora son las 00:00:47.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi