?
Solved

repeatable components?

Posted on 1998-04-19
2
Medium Priority
?
167 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 80 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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

770 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