Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 24-05-2012
Avatar de PaulaGV
PaulaGV PaulaGV is offline
Miembro
NULL
 
Registrado: mar 2012
Posts: 34
Poder: 0
PaulaGV Va por buen camino
Talking pilas y shape

holaaa!
bueno, les cuento que puede acercarme mucho mas a lo que quería hacer!igual me faltan un par de cositas.
acá esta el código:
Código Delphi [-]
var
  Form1: TForm1;
  pila:TStack;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
figura:TShape;
begin
figura:=TShape.Create(Self);
    figura.Left:= 200;
    figura.Top := 150;
    figura.Height:= 150;
    figura.Width := 250;
figura.Brush.Color:=RGB(Random(255),Random(255),Random(255));

case Random(6) of
  1:begin
  figura.shape:= stCircle;
  ListBox1.Items.Add('Circulo');
  Shape1.Brush.Color:=figura.Brush.Color;
  Shape1.Shape:=figura.Shape;
  end;
  2:begin
  figura.shape:=stRectangle;
  ListBox1.Items.Add('Rectangulo');
  Shape1.Brush.Color:=figura.Brush.Color;
  Shape1.Shape:=figura.Shape;
  end;
  3:begin
  figura.shape:=stSquare;
  ListBox1.Items.Add('cuadrado');
  Shape1.Brush.Color:=figura.Brush.Color;
  Shape1.Shape:=figura.Shape;
  end;
  4:begin
  figura.Shape:=stRoundRect;
  ListBox1.Items.Add('Rectangulo bordes redondeado');
  Shape1.Brush.Color:=figura.Brush.Color;
  Shape1.Shape:=figura.Shape;
  end;
  5:begin
  figura.Shape:=stEllipse;
  ListBox1.Items.Add('elipse');
  Shape1.Brush.Color:=figura.Brush.Color;
  Shape1.Shape:=figura.Shape;
  end;
  6:begin
  figura.Shape:=stRoundSquare;
  ListBox1.Items.Add('cuadrado bordes redondeado');
  Shape1.Brush.Color:=figura.Brush.Color;
  Shape1.Shape:=figura.Shape;
  end;
end;

  case Random(6) of
  1:begin
  figura.Pen.Style:=psSolid;
  Shape1.Pen.Style:=figura.Pen.Style;
  end;
  2:begin
  figura.Pen.Style:=psDash;
  Shape1.Pen.Style:=figura.Pen.Style;
  end;
  3:begin
  figura.Pen.Style:=psDot;
  Shape1.Pen.Style:=figura.Pen.Style;
  end;
  4:begin
  figura.Pen.Style:=psDashDot;
  Shape1.Pen.Style:=figura.Pen.Style;
  end;
  5:begin
  figura.Pen.Style:=psDashDotDot;
  Shape1.Pen.Style:=figura.Pen.Style;
  end;
  6:begin
  figura.Pen.Style:=psClear;
  Shape1.Pen.Style:=figura.Pen.Style;
  end;
  end;
  pila.Push(figura);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ListBox1.Items.Clear;

end;

procedure TForm1.Button3Click(Sender: TObject);
begin
if pila.Count>0 then
begin
  TShape(pila.Pop).Parent:=Self;
  
end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
pila:=TStack.Create;

end;
end.

ahora lo que quiero hacer es borrar esa pila que se me genero, es decir la que quedo en el form, como podría hacerlo?
después leí en la "ayuda" de delphi que hay una propiedad que se llama AutoSize, pero no la pude aplicar, no me aparece en cuadro de propiedades
conocen alguna propiedad que le asigne a un shape todos los atributos de otro shape?
Responder Con Cita
Respuesta



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
Una ayudita con TShape JerS Varios 8 28-04-2010 04:07:11
Error Tshape el compilar URBANO Varios 6 04-12-2009 20:29:26
Cómo dibujar una línea en un TShape Patricio Varios 1 18-02-2009 17:21:36
Componente TShape con Label? Jorge Rojas M. OOP 8 26-03-2008 01:11:33
Un TShape con personalidad elcigarra Gráficos 7 21-07-2005 04:47:00


La franja horaria es GMT +2. Ahora son las 09:06:01.


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