Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Accessing objects created at RunTime

Posted on 2000-03-16
2
Medium Priority
?
151 Views
Last Modified: 2010-04-04
I've created series of RichEdit on a series of tabsheets in a pagecontrol.  Everytime the user clicks on the new button, they get a new tabsheet with a new richedit on it.  To the side is a list of items that can be double-clicked with the idea being to added the item they have double-clicked on to the currently showing RichEdit.

I've got everything except how to pass the string that gets created when they double-click on the item they want to add to the currently showing RichEdit.

Any help would be greatly appreciated.
0
Comment
Question by:Orca
2 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 200 total points
ID: 2625823
You can identity the richedit on the current tab like this:

var
 TheRichEdit : TRichEdit;

....
  TheRichEdit := Nil
  with PageControl1.ActivePage do
    for I := 0 to ComponentCount - 1 do
      if Components[i] is TRichEdit then
        TheRichEdit := Components[i] as TRichEdit

  if Assigned(TheRichEdit) then
    // Add the item to the richedit here...

Cheers,

Raymond.
0
 

Author Comment

by:Orca
ID: 2628134
Thanks.  I had to change from Component to Control, but then everything worked fine.
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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

971 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