Re: open and copy funtions under one button

Posted by Jenny on March 07, 2006

In Reply to open and copy funtions under one button posted by john vanderelst on February 25, 2006

: I ask before and maybe wasn't clear enough.
: I have a run option under one button
: And
: A copy fuction under the second buttond.
: I want to have the run action and copy action both under one button instead.

If I understand you well, you have something like this:

procedure TForm1.Button1Click(Sender: TObject);
begin
  // Code for run action:...
  // ...
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
  // Code for copy action:...
  // ...
end;

You can simply combine the code like this:

procedure TForm1.Button1Click(Sender: TObject);
begin
  // Code for run action:...
  // ...
  // Code for copy action:...
  // ...
end;

Or maybe the other way arond:

procedure TForm1.Button1Click(Sender: TObject);
begin
  // Code for copy action:...
  // ...
  // Code for run action:...
  // ...
end;

If you code it like this, are you having problems?

Related Articles and Replies


[ DelphiLand Forum ]