Solved

Tabbednotebook component

Posted on 1999-01-29
4
201 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
[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
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
BlackMan earned 10 total points
ID: 1363830
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
ID: 1363831
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
ID: 1363832
I think you can use TTabPage(TabBlad.Pages.Objects[TabBlad.PageIndex]).Caption = 'text' but I'm not 100% sure!
0
 

Author Comment

by:Vincentg
ID: 1363833
Hello Blackman,

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

Vincent

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

Suggested Solutions

Title # Comments Views Activity
Magic Software info 18 151
Firemonkey DbLookupComboBox equivalent ? 2 76
Breakpoint doesn't stop in my variable 3 45
can i put an image from resource into image tag ? 6 37
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

738 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