Solved

Accessing objects created at RunTime

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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month4 days, 8 hours left to enroll

636 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