Solved

Form and control programming

Posted on 2002-06-23
2
173 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

751 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