Solved

Tabbednotebook component

Posted on 1999-01-29
4
194 Views
Last Modified: 2010-04-06
Hello, I am trying to add a new tabblad on my project and put a richedit on it. (Editor)
Below is my code, this works but when I click on another
tab and go back everything is gone.
The component Tabbednotebook stands in the win3.1 tab of delphi3.
Please help me with this,
Greetz,
Vincent

===========================================================
begin
TabBlad.Pages.add('New');
TabBlad.SetFocus;

with TRichEdit.Create(Self) do
begin
 Parent := TabBlad;
 Align := alClient;
end;
end;
===========================================================
0
Comment
Question by:Vincentg
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
BlackMan earned 10 total points
Comment Utility
That's because you need to specify the tab of the notebook as owner to RichEdit. As this is an old control, there is no TabPage property, but you can do it this way:

with TRichEdit.Create(Self) do
begin
 Parent := TTabPage(TabBlad.Pages.Objects[TabBlad.PageIndex]);


0
 

Author Comment

by:Vincentg
Comment Utility
Thanks Blackman, Can you also tell me how I can rename a on runtime made
tabblad? When I save the tekst it would be nice the tabblad gets the same name.

Thanks again,

Vincent

0
 
LVL 7

Expert Comment

by:BlackMan
Comment Utility
I think you can use TTabPage(TabBlad.Pages.Objects[TabBlad.PageIndex]).Caption = 'text' but I'm not 100% sure!
0
 

Author Comment

by:Vincentg
Comment Utility
Hello Blackman,

This doesn't work.. Thanks anyway.. :)

Vincent

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

763 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

13 Experts available now in Live!

Get 1:1 Help Now