Javafx fxml文件TextArea换行和制表符 [英] Javafx fxml file TextArea line break and tab in text

查看:533
本文介绍了Javafx fxml文件TextArea换行和制表符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在.fxml文件的 TextArea 中编辑文本,因此我可以使用 line中断标签
Textarea是预定义的,无法编辑。

How to edit text in the TextArea in `.fxml file as such I can use line breaks and tabs. The Textarea is predefined and can not be edited.

要支持的图像

FXML文件

视图

推荐答案

如果您要直接使用文本,可以使用以下内容:

If you want to directly use the text you can use something :

<TextArea prefHeight="200.0" prefWidth="200.0" text="${'Multi\nLine\tTab'}" />

如果要在Scene Builder中使用,可以切换到多行模式。

In case you want to use in Scene Builder, you can switch to multi-line mode.

切换到多行模式,场景构建器将插入:

Switching to multi-line mode, scene builder will insert:

&#10; for \n 
&#9;  for \t

这篇关于Javafx fxml文件TextArea换行和制表符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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