首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何推断TextFlow中的分页符?

如何推断TextFlow中的分页符?
EN

Stack Overflow用户
提问于 2016-06-29 22:00:47
回答 0查看 1.5K关注 0票数 0

我正在尝试在我的应用程序中创建一个NotePad屏幕。创建便笺后,便会将其锁定且无法编辑,但可以将新页面添加到便笺。

我认为使用TextFlow可以很好地控制这一点。我想做的事情如下:

代码语言:javascript
复制
**Note Taker Name**
**Date of Note**
Line of Note Text
Line of Note Text
Line of Note Text
Line of Note Text
------------------------------------------
**Note Taker Name**
**Date of Note**
Line of Note Text
Line of Note Text
Line of Note Text
Line of Note Text

我尝试过这样做:

代码语言:javascript
复制
String s1 = "line of text";

textFlow.getChildren().add(new Text(s1));
textFlow.getChildren().add(new Text(System.lineSeparator()));
textFlow.getChildren().add(new Separator(Orientation.HORIZONTAL));
textFlow.getChildren().add(new Text(System.lineSeparator()));
textFlow.getChildren().add(new Text(s1));

scrollPane.setFitToWidth(true);

这为我提供了我想要的东西,除了分隔符只是一小行。我希望这条线跨越整个TextFlow,但我真的不确定该怎么做。

谢谢。

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38101927

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档