J
Jenbo
I have a richtextbox sitting on a tab control on a child form under
the MDI parent. I have undo, redo, cut etc controls on a toolbar on
the same tab control, I can code these no problem as the richtextbox
text property is not blanking so the canundo method is fine to use. I
have these methods also on the MDI parent as well so that the user
should be able to undo, redo, edit the action, text from the main
menu, but when I do the following
MPCE.Child_Forms.Policy policyWin = new MPCE.Child_Forms.Policy();
TabControl tabControlPolicy =
(TabControl)policyWin.Controls["tabControlPolicy"];
TabPage policyPage = (TabPage)tabControlPolicy.Controls["policyPage"];
RichTextBox rtbMain =
(RichTextBox)policyPage.Controls["richTextBoxMain"];
rtbMain.Undo();
the richtextbox text property is being blanked out. I have noticed in
some of the forum's that there was/is a bug in the richtextbox control
that is fixed as of XP SP2 which is what I am running, it had to do
with the text property blanking and methods not being correct because
of this, is this what is happening here, or is it something to do with
the way I am referencing the richtextbox itself, is that not done
correctly?
Any help welcome.
EJ
the MDI parent. I have undo, redo, cut etc controls on a toolbar on
the same tab control, I can code these no problem as the richtextbox
text property is not blanking so the canundo method is fine to use. I
have these methods also on the MDI parent as well so that the user
should be able to undo, redo, edit the action, text from the main
menu, but when I do the following
MPCE.Child_Forms.Policy policyWin = new MPCE.Child_Forms.Policy();
TabControl tabControlPolicy =
(TabControl)policyWin.Controls["tabControlPolicy"];
TabPage policyPage = (TabPage)tabControlPolicy.Controls["policyPage"];
RichTextBox rtbMain =
(RichTextBox)policyPage.Controls["richTextBoxMain"];
rtbMain.Undo();
the richtextbox text property is being blanked out. I have noticed in
some of the forum's that there was/is a bug in the richtextbox control
that is fixed as of XP SP2 which is what I am running, it had to do
with the text property blanking and methods not being correct because
of this, is this what is happening here, or is it something to do with
the way I am referencing the richtextbox itself, is that not done
correctly?
Any help welcome.
EJ