Solved

repeatable components?

Posted on 1998-04-19
2
165 Views
Last Modified: 2010-08-05
is there any repeatable compenents on there..
i 'd like to use a Tedit where on ocassion i can 'expand' the instance of a Tedit. Say i need Tedit1, Tedit2, Tedit3 but i don't want to show ("collapsed") tedit2/3 until i have a need to use them - due to screen-space constraints. Is there a mutant of Tedit like this out there?

thanks
0
Comment
Question by:eriklee
[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 8

Expert Comment

by:ZifNab
ID: 1335199
I don't know about a component, but what about this? :

1. Use TMemo,

or

2. If needed a TEdit, create it on run-time and place it under Tedit1.

Regards, Zif.
0
 
LVL 1

Accepted Solution

by:
pjdb earned 40 total points
ID: 1335200
You can create components at runtime
In the private part of the form declaration put :
myEdit:array[2..3] Of TEdit;

in the OnCreate event of the form put (to make sure to free the variable if they have been allocated only) :
Var
  i:Byte;
Begin
  For i:=2 To 3 Do
    myEdit[i]:=Nil;
End;

in a procedure or function (the one that shoul show the Edit boxes) put :
Begin
  myedit[2]:=Tedit.Create(Form1);
  myedit[2].Parent:=form1.Handle;
  {after that, it have a default position and size and can be acessed in the same way as a "standard" Edit box}
End;

in the OnDestroy event of the form (to free the variables) :
Var
  i:Byte;
Begin
  For i:=2 To 3 Do
    If myEdit[i]<>nil Then
      Try
        myEdit.Free;
      Except
      End;  
End;

JDB
0

Featured Post

Industry Leaders: 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

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…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

726 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