B4J Question TextFlow Questions

MrKim

Well-Known Member
Licensed User
Longtime User
So, I was using TextArea views but I need to set colors and text sizes for the text so I have switched to using Panes and CreateTextFlow but that has left me with at least a couple of questions. The first I asked about in another post but received no response.

Is it possible to get the width and height of the text in a textflow. I want to set the width of the pane to be as wide as the widest line.

Second, I frequently need to move the information from one pane to another. Is it possible to copy the text in a pane that has been set with textflow to another pane?

Thanks for any help.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The first I asked about in another post but received no response.
I actually answered: https://www.b4x.com/android/forum/t...imum-height-of-a-textflow.118861/#post-743745

The code in B4JTextFlow is very simple. The API is here: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/text/TextFlow.html

You will need to do some work to copy the children. Might be easier to create a list with all the actions taken to build the TextFlow and then execute them when needed.
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
Yes, I saw that right after I posted this, thank you.
The code in B4JTextFlow is very simple. The API is here: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/text/TextFlow.html
You will need to do some work to copy the children. Might be easier to create a list with all the actions taken to build the TextFlow and then execute them when needed.
Thanks Erel, I do actually have a function that creates the textflow and the data for each Pane is stored as a map with the pane so it is easier to recreate the textflow than reinvent the wheel :p . I asked because I am always looking for the faster, simpler way. Remember, many of us work in VB/VBA because it is simple. We are just trying to get job done. I am just a dumb database programmer.
 
Upvote 0
Top