Solved

Accessing objects created at RunTime

Posted on 2000-03-16
2
140 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now