完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
将.NET按钮放在面板上并使其不可见(在Properties-> Behaviour-> Visible = false中)以后希望在运行时根据某些条件使其可见。
使用了button.Visible = True.But它根本不起作用。 试图改变不同的按钮属性和功能,但没有成功。任何想法? 以上来自于谷歌翻译 以下为原文 placed .NET button on a panel and made it invisible (in Properties->Behaviour->Visible=false) later want to make it visible during runtime based on some conditions. Used button.Visible=True. But it did not work at all. Tried to change diffirent button properties and functions but without success. Any ideas? |
|
相关推荐
5个回答
|
|
这有点奇怪。
在设计时将Visible设置为false,稍后在运行时将其设置为true适用于“普通”对象,但它似乎不适用于.NET。解决方法当然是以编程方式将.NET控件设置为false 你的程序,这很好。 以上来自于谷歌翻译 以下为原文 This is a bit strange. Setting Visible to false at design-time and later at run-time set it true works for 'normal' objects but it doesnt seem to work for .NET. The workaround is of course to programatically set the .NET control to false at the beginning of your program, this works fine. |
|
|
|
我之前已经尝试过这种方式。在运行时设置时间按钮可见属性被设置为True(默认值)设置按钮。可见为False,但是在面板上仍然可以看到buttong!那么它对你有用吗?
以上来自于谷歌翻译 以下为原文 I have tried this way already before. at design time button visible property is being set to True (default value) at run time setting button.visible to False and the buttong is still visible on the panel! how did it work for you then? |
|
|
|
谢谢你的例子。我实际上也是这样做的。
但我希望完全隐藏按钮,并在我真正需要它时使其可见。我使用BackColor玩按钮,从VEE运行我的应用程序时得到了我想要的。但是运行时版本为BackColor使用了不同的颜色。 以上来自于谷歌翻译 以下为原文 thanks for the example. well, I do the same actually. but I want completely hide the button and make it visible when I really need it. I played with BackColor for the button and got what I want when run my application from VEE. But runtime version uses a different color for BackColor. |
|
|
|
是的,你最终得到它是正确的,这不是重点。有一些奇怪的东西(又名错误)与背景设置。
即使属性编辑器指示正确的颜色,实际上也会使用另一种颜色。然后在创建运行时版本时使用这些不正确的颜色。严重的问题是颜色在开发中可能看起来正确。 ENV。 但在运行时出错了。 似乎在某些情况/对象中没有正确初始化颜色。我修改程序以更好地(?)说明问题:button(1).veebutton(1).vxe 按钮(1).vee7.1 KB 以上来自于谷歌翻译 以下为原文 Yes, you get it to be correct eventually, that is not the point. There are some strange things (aka bugs) with backcolor settings. Even if the Property editor indicates correct color, another color is actually used. And these incorrect colors are then used when a runtime version is created. The serious problem is the fact colors may look correct in dev. env. but becomes wrong in run-time. Seems that colors are not initialized correctly in some situations/objects. I modified the program to better (?) illustrate the problem(s): button (1).vee button (1).vxe 附件
|
|
|
|
是的,我也注意到了背色问题。
现在看起来像一个bug.-mk 以上来自于谷歌翻译 以下为原文 Yup I notice the backcolor issue too. Looks like a bug for now. -mk |
|
|
|
只有小组成员才能发言,加入小组>>
1297 浏览 0 评论
2378 浏览 1 评论
2199 浏览 1 评论
2068 浏览 5 评论
2955 浏览 3 评论
1137浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
759浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
946浏览 0评论
1297浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-28 10:02 , Processed in 1.481136 second(s), Total 84, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号