combining 2 applications together

hi
application that generates buttons by itself and a application that

works a liitle bit diffrent but based on thesame thing but it doesn't generate buttons


thank you

more points will be aval....
zgeorge_2Asked:
Who is Participating?
 
shaneholmesConnect With a Mentor Commented:
Hi George,

How cam I help!

Shane
0
 
shaneholmesCommented:
George,

 You can see from the POS application I wrote for you, how to create an application which generates buttons at runtime.

1.) Declare a Object variable of type TButton

var
 MyButton: TButton

2.) You create a Button, on the owner

 MyButton:= TButton.Create(Panel1);

3.) set the objects parent

 MyButton.Parent:= Panel1;

4.) Set its position and size properties

 MyButton.Left:= 10;
 MyButton.Top:= 10;

 MyButton.Width:= 100;
 MyButton.Height:= 50;

5.) Set any other properties

 MyButton.Caption:= 'Click Me';

6.) Assign it an OnClick event

  MyButton.OnClick:= MyClick;


procedure TForm1.OnCLick(Sender: TObject);
begin
 ShowMessage('You clicked me!');
end;


Shane
0
All Courses

From novice to tech pro — start learning today.