[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

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....
0
zgeorge_2
Asked:
zgeorge_2
  • 2
1 Solution
 
shaneholmesCommented:
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now