点击组合框中的项目后,将显示“特殊面板". [英] Particular Panel display after tapping the items from combobox.

查看:62
本文介绍了点击组合框中的项目后,将显示“特殊面板".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生您好,
我已经在Visual Studio</b>中以< b>窗口形式创建了标签,在它前面,我放置了combobox..ok.我从数据库(mssql)中删除了三项.我在下面创建了下面的三个面板,一个在另一个窗口的下面.我要从下拉列表中选择一个项目,我想要的是:它的面板仅在< b>可见</b>中显示.同样,其他面板被称为< b"/b".再次,我将从下拉列表中的列表中选择其他项,现在也只有其面板显示在下面.其余面板应为< b> </b> ;;不可见.我希望在< b>中完成此操作.仅Windows窗体</b>.如何实现此功能
请帮忙,需要紧急.

谢谢& Reagrds
Pradeep CB

Hello sir,
I had created the label in <b>window form in visual studio</b>,in front of it ,i placed the combobox..ok.I made to drop down three items from the database(mssql).And also i had created the three panel below,one below the other in the same window.I will select one item from the dropdown list,what i want is:its panel will only be <b>visible</b> and other panels are said to be <b>invisible</b>.Again i will select the other item from the list from the dropdown list,now also only its panel as to be displayed below.Remaining panel should be <b>invisible.</b> .I want this to be done in<b> windows form only</b>.How to achieve this sir
plz do help,need urgent.

Thanks & Reagrds
Pradeep CB

推荐答案

private bool HidePanels()
{
    panel1.Visible = false;
    panel2.Visible = false;
    panel3.Visible = false;
}



Form_Laod
中设置Comboes Tag =相关面板 例如:



Set Comboes Tag = related Panels in Form_Laod
for example:

myCombo1.Tag = Panel1;
myCombo2.Tag = Panel2;
myCombo3.Tag = Panel3;



DropDown 组合事件中



In DropDown event of Comboes

HidePanels(); 
((Panel)(((ComboBox)sender)).Tag).Visible = true;


这篇关于点击组合框中的项目后,将显示“特殊面板".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆