使文本框可见/不可见 C# [英] Making text box visible/unvisible c#

查看:42
本文介绍了使文本框可见/不可见 C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 Windows 窗体应用程序,其中有一个按钮和一个 textbox.

I'm working on a windows form application and I have a button and a textbox in it.

当按钮被按下时,它应该使 textbox 可见和隐藏.

When the button is pressed, it should make the textbox visible and hidden.

推荐答案

myTextbox.Visible = !myTextbox.Visible;

这篇关于使文本框可见/不可见 C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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