有界紧凑框架多行文本字段无法正确显示换行符
我有两个多行文本框,一个已绑定,一个未绑定。
两者都接受退货,都是多行的。我可以使用 Environment.Newline 或 \r\n 添加新行,并且它应该如何显示。
我的第二个框设置完全相同,只是它绑定到数据源(字符串属性)。换行符显示为正方形。如果我通过搜索environment.newline或\r\n来替换此文本,它会发现方块很好,因此数据源具有用于显示新行的正确字符。
我可以将文本属性从绑定文本框直接复制到未绑定文本框中,并且它将在未绑定框中正常显示。
有什么想法吗?
I have two multiline text boxes, one bound, one not.
Both accept returns, both are multiline. I am able to add a new line with either Environment.Newline or with \r\n just fine and it displays how it should.
I have the 2nd box setup exactly the same, except it is bounded to a datasource (string property). The newlines appear as squares. If I do a replace on this text with searching for environment.newline or \r\n it finds the squares just fine so the datasource has the proper characters for displaying new lines.
I am able to copy the text property from the bound textbox directly into the unbound textbox and it will display fine in the unbound box.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最终发现是我的数据在换行符周围有奇怪的字符,从中提取它的应用程序不是最好的。当我复制文本时,这些字符当然会丢失。
Eventually figured out that it was my data having odd characters surrounding the line breaks, the application it is pulled from isn't the greatest. When I'd copy the text of course those characters would be lost.