keron
asked on
Easy Question!! 200 Points!
I use a pagecontrol,and a tabsheet on it with a richedit on the tabsheet.
Now in my program I want to Make new
tabsheets on the pagecontrol,each one
have the save properties with the source
tabsheet,same width,same height,and
the same Event procedure such as Onchange and so on.
and each of the tabsheets are noninterference.
how can i do it???
Now in my program I want to Make new
tabsheets on the pagecontrol,each one
have the save properties with the source
tabsheet,same width,same height,and
the same Event procedure such as Onchange and so on.
and each of the tabsheets are noninterference.
how can i do it???
ASKER
o£¡
the problem had make a little change
I use Twebbrower (IE Brower Control)
to instead of richedit to display html files and text files.
but when I try your code ,
Delphi said that the twebbrower's
parent property is read only.
How can I do it???
Thanks a lot !!!!
:)
the problem had make a little change
I use Twebbrower (IE Brower Control)
to instead of richedit to display html files and text files.
but when I try your code ,
Delphi said that the twebbrower's
parent property is read only.
How can I do it???
Thanks a lot !!!!
:)
ASKER
How can i do???
It really a trouble!!
rwilson
waiting for your Opinion!
:)
It really a trouble!!
rwilson
waiting for your Opinion!
:)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
May be better create own class inherited from the TTabSheet with all necessary properties and then use this class in run-time for creation any number identical sheets?
TMyTabSheet = class(TTabSheet)
private
FRichEdit: TRichEdit;
...
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
...
end;
constructor TMyTabSheet.Create(AOwner: TComponent);
begin
inherited;
FRichEdit := TRichEdit.Create(...);
...
end;
and so on.
TMyTabSheet = class(TTabSheet)
private
FRichEdit: TRichEdit;
...
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
...
end;
constructor TMyTabSheet.Create(AOwner:
begin
inherited;
FRichEdit := TRichEdit.Create(...);
...
end;
and so on.
ASKER
I love you rwilson!!!!
:P
:P
:-)
TheTabSheet := TTabSheet.Create(Self);
TheTabSheet.Parent := ThePageControl;
TheTabSheet.PageControl := ThePageControl;
TheTabSheet.Caption := 'Editor';
And add a TRichEdit to it like this:
ARichEdit := TRichEdit.Create(Self);
ARichEdit.Parent := TheTabSheet;
ARichEdit.Align := alClient;
ARichEdit.OnChange := MyOnChangeHandler;
etc with the other properties.
In the events you can use the Sender parameter to distinguich between the RichEdits.
Cheers,
Raymond.