Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // this happens inside class MainForm : Form
- x = new X(_node, _nodeList, this, tsLblMessage);
- // constructor, X
- public X(TreeNode node, List<TreeNode> nodeList, Form parentForm, ToolStripStatusLabel tssLabel)
- {
- _node = node;
- _nodeList = nodeList;
- _parentForm = parentForm;
- _tssLabel = tssLabel;
- _y = new Y(_parentForm, _dataAnalysis, _node)
- {
- Dock = DockStyle.Fill
- };
- // This doesn't work
- // _parentForm.Controls.Add(_y);
- // This does work, but I don't want MDI
- _form = new Form { MdiParent = _parentForm };
- _form.Controls.Add(_y);
- _form.Show();
- }
- // constructor, Y : UserControl
- public Y(Form parentForm, DataAnalysis dataAnalysis, TreeNode node)
- {
- InitializeComponent();
- _parentForm = parentForm;
- _dataAnalysis = dataAnalysis;
- _node = node;
- treeView.Nodes.Add(_node);
- }
Add Comment
Please, Sign In to add comment