Hi folks.
I use a RadRibbonForm as my main form (MDI container) and also a RadDock control to host my MDI child forms. My main form's Load event follows:
The code that creates a new child form follows:
The problem is that after the line: "frm.MdiParent = this;" (this is the main form and is not null) frm.MdiParent becomes null !!!
Can you please help me?
Thank you in advance.
I use a RadRibbonForm as my main form (MDI container) and also a RadDock control to host my MDI child forms. My main form's Load event follows:
private void MainForm_Load (object sender, EventArgs e) |
{ |
if (this.IsMdiContainer != true) |
this.IsMdiContainer = true; |
string theme = ThemeResolutionService.ApplicationThemeName; |
ThemeResolutionService.ApplicationThemeName = "Office2007Silver"; |
this.Text = Properties.Resources.AppName; |
this.dock.AutoDetectMdiChildren = true; |
this.dock.DocumentManager.DocumentInsertOrder = DockWindowInsertOrder.ToBack; |
this.MdiChildActivate += new EventHandler (MainForm_MdiChildActivate); |
FormPosition.LoadFromRegistry (this, Properties.Resources.AppName); |
} |
The code that creates a new child form follows:
EditorForm frm = new EditorForm (file); |
frm.MdiParent = this; |
RichTextBoxEx txt = frm.Editor; |
txt.CursorPositionChanged += new System.EventHandler (CursorPositionChanged); |
txt.SelectionChanged += new System.EventHandler (SelectionChanged); |
txt.MouseDown += new MouseEventHandler (OnRichTextBox_MouseDown); |
frm.Show (); |
The problem is that after the line: "frm.MdiParent = this;" (this is the main form and is not null) frm.MdiParent becomes null !!!
Can you please help me?
Thank you in advance.