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

 
 
Herramientas Buscar en Tema Desplegado
  #8  
Antiguo 07-04-2006
zvf zvf is offline
Miembro
 
Registrado: abr 2006
Posts: 158
Poder: 21
zvf Va por buen camino
Gracias a todos!
Vean, creo que por ahi va el asunto, porque yo creo un boton en tiempo de ejecucion, mi codigo es el siguiente:

Código Delphi [-]
Procedure TFPrincipal.CreaBoton;
  var NewBoton : TLabel;
      nombre : string;
      scontador:string;
      sventana_actual : string;
   begin
       if (band = 0) then  //PRIMER BOTON QUE CREA
               begin
               ventana_actual:=1;
               sventana_actual:= IntToStr (ventana_actual);
               margen_izq := margen_izq_ini;
               margen_sup := margen_sup_ini;
               band := 1;
               end
        else
               begin
                margen_izq := margen_izq_ant;
                margen_sup := margen_sup_ant + alto_boton + margen_sup_ini;
                if (margen_sup > margen_inf) then
                    begin
                     margen_izq := margen_izq + margen_izq_ini;
                     margen_izq := margen_izq + ancho_boton;
                     margen_sup := margen_sup_ini;
                    end;
                if (margen_izq > margen_dere) then
                    begin
                     margen_izq := margen_izq_ini;
                     margen_sup := margen_sup_ini;
                     ventana_actual := ventana_actual+1;
                     sventana_actual:= IntToStr (ventana_actual);
                    end;
               end;
     with NewBoton do
        begin
        case ventana_actual of
          1: begin
             NewBoton := TLabel.create(FPrincipal.GroupBoxProd1);
             Parent := FPrincipal.GroupBoxProd1;
             end;
          2: begin
             NewBoton := TLabel.create(FPrincipal.GroupBoxProd2);
             Parent := FPrincipal.GroupBoxProd2;
             end;
          3: begin
             NewBoton := TLabel.create(FPrincipal.GroupBoxProd3);
             Parent := FPrincipal.GroupBoxProd3;
             end;
          4: begin
             NewBoton := TLabel.create(FPrincipal.GroupBoxProd4);
             Parent := FPrincipal.GroupBoxProd4;
             end;
          end;
        scontador:= IntToStr (contador);
        nombre:= 'Boton';
        Name := nombre+scontador;
        Color:= clMoneyGreen;
        Width := ancho_boton;
        Height := alto_boton;
        Left := margen_izq;
        Autosize := false;
        Top := margen_sup;
        Caption := varCaption;
        if soyingrediente <>1 then
             OnClick := mostrar_productos
        else
             OnClick := mostrar_productos;
        margen_izq_ant := margen_izq;
        margen_sup_ant := margen_sup;
      end; //fin del con hacer
  end;
//////  FIN DEL PROCEDIMIENTO CREAR UN BOTON EN TIEMPO DE EJECUCION   /////////
Responder Con Cita
 



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
Detener un error de access violation de la DbGrid - delphi..... uper Varios 1 21-09-2005 21:54:42
Error Access Violation en Paquetes (Packages) DarKraZY OOP 4 13-09-2005 14:35:31
Maldito ... Access violation Error (QuickReports) User_baja1 Impresión 1 20-04-2005 10:29:32
Error Access Violation samame Conexión con bases de datos 1 01-04-2004 10:48:10
Error Access Violation con Crystal 9 samame Impresión 0 30-03-2004 14:03:17


La franja horaria es GMT +2. Ahora son las 11:17:38.


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