?
Solved

repeatable components?

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

650 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