Javafx fxml文件TextArea换行和制表符 [英] Javafx fxml file TextArea line break and tab in text
本文介绍了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:
for \n
	 for \t
这篇关于Javafx fxml文件TextArea换行和制表符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文