单击按钮隐藏/显示窗口的一部分 [英] Hide/show part of the window with a button click

查看:27
本文介绍了单击按钮隐藏/显示窗口的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的表单,其中包含一个主视图、一些文本框和一个添加"按钮,用于添加显示在主视图中(并存储在文本文件中)的数据.我想要做的是添加一个小按钮来切换添加控件的隐藏/显示.这种按钮通常是一个小方块,包含两个箭头,根据状态向上/向下.我该怎么做?

I have a simple form containing a main view and also some text boxes and an "add" button that I use for adding data that is displayed in the main view (and stored in a text file). What I want to do is to add a little button that will toggle hiding/showing of the adding controls. Such button usually is a small square containing two arrowheads pointing up/down depending on the state. How do I do that?

(我很抱歉这个糟糕的标题,但我不知道它的正确名称.谁能告诉我?)

(I'm sorry for the terrible title, but I don't know the proper name for this. Could anyone tell me?)

推荐答案

我认为 WinForms 中没有内置的东西.当我需要做类似的事情时,我只是改变了表单的高度...

I don't think there's something built-in in WinForms for that. When I needed to do something similar, I just changed the Height of the form...

这篇关于单击按钮隐藏/显示窗口的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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