简体   繁体   English

用于显示或隐藏特定面板的控件是什么

[英]What is the control used to show or hide a particular panel

嗨,我是C#的新手,现在我正在使用dev express控件。现在在我的屏幕上我想要一个控件(外观类似于navbargroup)。我希望此控件按钮能够以一种应该显示和隐藏面板的方式工作同时单击它像下拉菜单。。我需要使用哪个控件???

You can use Visible property of your Panel in your NavigationBarControl_Click event 您可以在NavigationBarControl_Click事件中使用面板的Visible属性。

SomePanel.Visible=true; //if you want to show
SomePanel.Visible=false; //if you want to hide

I've never used Devexpress, but I would image in this case it's no different to the standard controls. 我从未使用过Devexpress,但在这种情况下,我会为它成像,它与标准控件没有什么不同。

You would create a button and in the event handler of that button you would set the Visible property of the panel that you want to show/hide to true/false. 您将创建一个按钮,并在该按钮的事件处理程序中将要显示/隐藏的面板的Visible属性设置为true / false。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM