Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   BUtton (https://www.clubdelphi.com/foros/showthread.php?t=33224)

yoko 30-06-2006 02:39:41

BUtton
 
Mi problema es el sig necesito crear un button en tiempo de ejecucion, a ver si me pueden ayudar de antemano muchas gracias :)

esocrates 30-06-2006 04:28:05

Un ejemplo para hacer lo que pedís.
Código Delphi [-]
Var
MiBoton : TButton; //Puntero a la clase
begin
MiBoton := TButton.Create(Form1); // Se crea el Botón en el Form 1

with MiBoton do //Con el Botón creado hacer
begin
Parent := Form1; // Contenedor del Botón
height := 30;
width := 120;
caption := 'Mi Botón';
left := (Form1.ClientWidth - width) div 2;
top := (Form1.ClientHeight - height) div 2;
end;
end;
Un saludo


La franja horaria es GMT +2. Ahora son las 06:49:34.

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