如何设置文本框字符串数组? [英] how to set textbox string array ?

查看:91
本文介绍了如何设置文本框字符串数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我想将文本框数组设置为索引1

i将文本框放在winform中并将其设置为多行,我想仅在数组[1]显示值并显示不要超过它,在文本框数组[0]没有什么应该显示那里



所以我怎么能这样做?

hello i want to set the textbox array to index 1 only
i put the textbox in winform and set it to multi-line and i want to show value at array[1] only and it show not go above it and at textbox array[0] nothing should be show there

so how i can do that?

推荐答案

您可以使用数据绑定的Format和Parse事件将空行添加/删除到您绑定到TextBox的任何内容(例如,添加/删除\\\\ n到开头字符串)。
You can use the Format and Parse event of the Databinding to add/remove an empty line to whatever it is you're binding to the TextBox (e.g. add/remove \r\n to the beginning of the string).


这篇关于如何设置文本框字符串数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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