How close NUIDocument


Author
Message
Pavel Kozak
Pavel Kozak
Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)
Group: Forum Members
Posts: 10, Visits: 1

I use the tabs on NUIDocument to display various elements on the meringue and WinForm UserControl as follows:

private static NUIDocument ShowDoc(Form DocForm, string Title, string Key, int Index)
{
DocForm.TopLevel = false;
DocForm.FormBorderStyle = FormBorderStyle.None;
DocForm.ShowIcon = false;
DocForm.ShowInTaskbar = false;
DocForm.Dock = DockStyle.Fill;
DocForm.Show();

NUIDocument doc = new Nevron.UI.WinForm.Controls.NUIDocument();
doc.Client = DocForm;
doc.Text = title;
doc.Key = Key;
doc.ImageIndex = Index;

DockMng.DocumentManager.AddDocument(doc);
return doc;
}

This works fine, help with:

1. Is this correct?
2. As with inside DocForm (Form) with reference to the parent NUIDocument properly close a tab that we have created.
Reply
Pavel Kozak
Pavel Kozak
Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)
Group: Forum Members
Posts: 10, Visits: 1
This decision was also, but the Form and UserControl like so that they can design in the designer.
If I do not got it wrong, then the problem remains the same.

My task - to place on the Form or Panel button with the action of "Close", which should properly close NUIDocument which is this component!
As an interim, I call the "NUIDocument". Host.Destroy () and the tab is closed, but it is barbarism, and as I understand the consequences.
As with reference to NUIDocument properly close it, ie as gross pressed the "cross" in the row of tabs with titles of documents.

Pavel.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search