如何从面板中排除组合框? [英] How to exclude a combobox from a panel?

查看:129
本文介绍了如何从面板中排除组合框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最初,只有面板可见,然后当用户点击按钮时,面板将消失,并出现标签,组合框和按钮。但我遇到的问题是只出现标签和按钮,组合框仍然不可见。



最初组合框,标签和按钮与面板重叠并且只是通过编码变得不可见,但我不明白为什么按钮和标签出现但组合框不会出现。









Initially, only the panels are visible, and then when the user clicks on a button, the panels will disappear and the label, combobox, and button will appear. But the problem I'm having is that only the label and button appear, and the combobox remains invisible.

Initially the combobox, label, and button overlap with the panel and are just made invisible through coding, but I can't understand why the button and label show up but the combobox won't.




private void Form1_Load(object sender, EventArgs e)
        {
            cboIncome.Visible = false;
            lblIncType.Visible = false;
            btnAdd.Visible = false;

        }

        private void btnIncome_Click(object sender, EventArgs e)
        {
            panel1.Visible = false;
            panel2.Visible = false;
            panel3.Visible = false;
            panel4.Visible = false;
            panel5.Visible = false;

            cboIncome.Visible = true;
            lblIncType.Visible = true;
            btnAdd.Visible = true;

        }

推荐答案

您的组合框很可能被添加为您设置的面板之一的子控件可见错误。

在Visual Studio的视图菜单上,单击其他Windows,然后单击文档大纲。文档大纲窗口将打开。

检查组合框所在的大纲并将其移动到lblIncType和btnAdd所在的位置。
Most probably your combobox may be added as a child control of one of panel you set visible false.
On the View menu in Visual Studio, click Other Windows, and then click Document Outline. The Document Outline window will open.
check in the outline where your combobox located and move it to place where lblIncType and btnAdd located.


组合框位于刑罚就是为什么它不可见。首先找到合适的解决方案是组合框位于刑法中?然后当按钮点击
combo box located in to the penal that's why it not visible. first find the proper solution is that where combo box is located in penal ? then this particular penal make visible true when button click


这篇关于如何从面板中排除组合框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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