表单应用程序中的扩展器控制 [英] Expander control in Form Application

查看:84
本文介绍了表单应用程序中的扩展器控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我们可以在表单应用程序中使用Expander控件或类似的控件吗?


Thx

Hi,
Can we have Expander control or something like that in Form Application?


Thx

推荐答案

类似的东西[ ^ ]?

-Saurabh
Some thing like this[^]?

-Saurabh


好的.您可以设置一个普通按钮,使其看起来像图像中的扩展按钮.现在,将所有控件都放入已折叠的组框内.按下按钮后(您必须检查组框的状态是展开还是折叠),您可以将其高度(甚至宽度)缓慢增加到原始状态.而且您也应该逐步增加它.

使用WPF可以更轻松地完成相同的工作,但是您必须等待有关该主题的专家做出回应.

如果您确实去做并编写了代码,则将所有时间包装在用户控件中值得使用,您可以使用该控件并一次又一次地重复使用.

[edit]
当然,在上一篇文章中查看Dario的示例更容易!
Sure. You can set a normal button to look like the expander button you have in the image. Now, you throw in all your controls inside of a groupbox that you have collapsed. Once the button is pressed (you''d have to check on the state of the groupbox whether it is expanded or collapsed) you can slowly increase its height (and maybe even width) to whatever it was in the original state. And you ought to increment it in steps too.

You could the same so much more easily with WPF, but you''d have to wait for an expert on that subject to respond.

If you do go about and do write that, you will find it worth your while to wrap all of that in a user control that you can use and reuse again and again.

[edit]
of course, looking at Dario''s example in the previous post is even easier!


这篇关于表单应用程序中的扩展器控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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