Solved

Accessing objects created at RunTime

Posted on 2000-03-16
2
147 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
[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 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

710 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