如何在“x”后面插入换行符人物
我目前正在开发一个新闻广播图形程序,该程序使用 Visual Basic 编写脚本。我的挑战是这样的:
我有一个 .xml 文件,其中包含多条数据,其中一条数据需要添加到图形(我们网站的新闻标题)中。然而,这些标题对于图形来说太长,需要添加换行符。我已经通过图形软件的其余部分成功地将这个标题添加到脚本中,它的 temp.txt 名称是 BodyTxt(i).Text (其中 (i) 是脚本另一部分循环的一部分,但会始终等于 1、2 或 3)。 35 个字符后,我需要换行。做到这一点最简单的方法是什么?
为了供将来参考,我可以看到它被用来在网页中创建类似的脚本,以便自动从 RSS 或 .xml 提要填充数据字段,而不会破坏模板,也不会强制字体缩小以适合整个页面字段,或在单词中间创建换行符。
I'm currenty working on a newscast graphics program that is using Visual Basic for scripting. My challenge is this:
I have a .xml file that contains several pieces of data within it, one of which needs to be added to the graphic (a news headline from our website). These headlines are too long for the graphic, however, and need a line break added to them. I have successfully gotten this headline into the script through the rest of the graphics software, and it's temp.txt name is BodyTxt(i).Text (where (i) is a part of a loop for another part of the script, but will always equal 1, 2, or 3). After 35 characters, I need a line break. What would be the simplest way of doing this?
For future reference, I could see this being used in order to create a similar script within a web page in order to automatically populate data fields from an RSS or .xml feed without breaking the template and either forcing a font to shrink to fit the entire field, or creating a line break in the middle of a word.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是您要找的吗?
产生以下输出:
Is this what you're looking for?
Produces this output: