本文介绍了如何隐藏和显示树视图左侧菜单项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows Mdi Parent窗体的左侧有Tree View Control。如何隐藏和显示树视图控件。(例如:Visual Studio TOOL BOX方法)。请帮助我。

I have Tree View Control on Left side in a Windows Mdi Parent form . How can i Hide and Show the Tree view control.(eg: Visual Studio TOOL BOX Method). Please Help Me.

推荐答案

ChildForm1 child1 = new ChildForm1();
ChildForm2 child2 = new ChildForm2();

private void MdiParentForm_Load(object sender, System.EventArgs e)
{
    // hide the close box ?
    child1.ControlBox = false;
    // borderless, without Caption ?
    child1.FormBorderStyle = FormBorderStyle.FixedToolWindow;
    child1.Text = "";

    child1.MdiParent = this;
    child1.Dock = DockStyle.Left;

    child2.MdiParent = this;
    child2.Dock = DockStyle.Right;

    child1.Show();
    child2.Show();     
}


这篇关于如何隐藏和显示树视图左侧菜单项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 15:19