Solved

Accessing objects created at RunTime

Posted on 2000-03-16
2
146 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 50 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Title # Comments Views Activity
Delphi cmd execution 6 67
Can Viruses spread while transferring Binary data with Winsock 2 89
Downloading email attachments 2 80
Firemonkey allowing RTL on android 6 47
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 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