-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question regarding nodeFactory - custom Node implementation instead of TextExt #1178
Comments
Can you try and give a bit more detail as it's not clear if you want to have a fixed width font (i.e. Text), or if you want the text area to be fixed width (i.e. no wrapping), or do you mean that a paragraph may only be X characters wide and no more ? |
My texts are like
As the text before e.g.
I dont want to do modification to the text content. Just want to be visually good. |
It would be great if the TextFlow can be used as the Node produced by nodeFactory.
Therefore, I would like to have the answers regarding two things:
|
Sorry for the delayed response. I think a possibly better way of solving your problem may be to have a look at the hyperlink demo. I suggest modifying it so that instead of a hyperlink it returns a fix width Label that will then give the visual affect you are looking for, where you put the first part into the Label and the rest as normal text. |
Thanks for your response, although i did not try your demo. I have switched to another way (use webview and javascript code mirror with css to solve the issue already) Therefore this comment is closed now. |
In
GenericStyledArea
, there isnodeFactory
in its constructor.For
StyledTextArea
, it createsTextExt
which is extended fromText
.I tried many ways to make the fixed width for it, like
setWrappingWidth
,maxWidth
+minWidth
+prefWidth
, still do not work.I tried to modify the Text constructor's parameter to a padded text, the text width can be wider but looks like it breaks the layout of the text area. Some texts are visible but not selectable.
So I tried to make a container, like TextFlow, Pane, VBox, HBox, ... , the width can be fixed but the text are not selectable.
I just want to make a fixed width Text.
Might I ask how...? Thanks.
The text was updated successfully, but these errors were encountered: