Solved

Form and control programming

Posted on 2002-06-23
2
174 Views
Last Modified: 2010-04-04
ok. simple, question. how, from a TForm1 procedure can i create a new form control (say for example create a new text box)?
0
Comment
Question by:tim_nash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
marcoszorrilla earned 40 total points
ID: 7101906
Try this very simple example:

procedure TForm1.Button1Click(Sender: TObject);
var
txtbox:Tedit;
begin
        txtbox:=Tedit.Create(form1);
        txtbox.Name:='MyEdit';
        txtbox.Parent:=form1;
        txtbox.Top:=Form1.Height div 2;
        txtbox.Left:=Form1.Width div 2;
        txtbox.text:='My Edit';
        //txt.OnClick := MyEvent;
end;


Best Regards.
Marcos.
0
 

Author Comment

by:tim_nash
ID: 7101922
thanx. exactly what i wanted.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month11 days, 7 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question