编辑框中的多行文字 [英] MultiLine Text in Edit box

查看:82
本文介绍了编辑框中的多行文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在从字符串表中加载的编辑框中显示如下所示的字符串.

愿望
-布瓦纳

已采取的步骤:
将多行属性设置为true.
在字符串表中添加了诸如"Wishes \ n \ t -Bhuvana"之类的字符串.

不使用以上两个步骤,仅在一行中使用.

有人可以帮忙吗?

I want to display the string like following in multiline in edit box which is loaded from string table.

Wishes
-Bhuvana

Steps taken:
Made multiline property to true.
Added string like "Wishes \n\t -Bhuvana" in String table.

No use of above two steps it is coming in single line only.

Can anyone pls help with this?

推荐答案


第一步是正确的,第二步使用\ r \ n而不是\ n.这意味着只要您想通过代码在编辑框中插入新行,就必须使用\ r \ n(GUI中的CTRL + ENTER).
Hi,
The first step is correct and in second step use \r\n instead of \n.Means whenever you want to insert new line in edit box through code you have to use \r\n(CTRL+ENTER in GUI).


尝试使用双反斜杠而不是单反斜杠.像这样

希望\\ n \\ t -Bhuvana"
try to use double backslash instead of single. like this

"Wishes \\n\\t -Bhuvana"


这篇关于编辑框中的多行文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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