在运行时模式下,不显示按钮 [英] In run time mode Button is not getting displayed

查看:140
本文介绍了在运行时模式下,不显示按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用.Net.I创建一个表单并在其中添加Button。

当我运行表单时,该按钮未显示。



我在运行时模式下使用哪个属性来显示按钮。

I am using .Net.I create a form & add Button in it.
When I Run the form that button is not getting displayed.

Which property i use to make button visible in Run time mode.

推荐答案

除非你在按钮上删除了按钮的Visible属性设计师,或者自己更改代码中的任何其他属性,并将其直接放在表单上,​​然后如果您可以在设计视图中看到它,您将在运行应用程序时看到它。



所以检查设计模式:

1)你能看到表格上的控件吗?

2)看看属性窗口 - 可见为true(默认情况下为)。

3)检查按钮是否在可见容器中 - 如果在设计器中右键单击它,上下文菜单将显示层次结构容器,从表单名称开始。如果你将它放入一个容器中,那个容器将列在表单下面。



将一个新按钮拖到表单(只有表单)并且什么都不做否则它。运行你的应用程序 - 你能看到吗?如果是这样,那么在设计器中,手动比较两个按钮并确保它们的属性相同。
Unless you changed the Visible property of the button when you dropped it on the designer, or altered any of it''s other properties in code yourself, and you dropped it directly on the form, then if you can see it in the Design View, you will see it when you run the application.

So check in the design mode:
1) Can you see the control on the form?
2) Look at the Properties window - is Visible true (it is by default).
3) Check the button is in a visible container - if you right click it in the designer, the context menu will show the hierarchy of containers, starting with the form name. If you have dropped it into a container, that container will be listed under the form.

Drag a new button to the form (and only the form) and do nothing else to it. Run your app - can you see it? If so, then in the designer, compare the two buttons manually and make sure their properties are the same.


这篇关于在运行时模式下,不显示按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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