Skip to content
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

TextWrap Not Working. #20

Closed
ghost opened this issue Mar 13, 2014 · 8 comments
Closed

TextWrap Not Working. #20

ghost opened this issue Mar 13, 2014 · 8 comments

Comments

@ghost
Copy link

ghost commented Mar 13, 2014

Hi Tomas,
The richTextArea text wrapping property does not seem to work here. Can you verify that? I used the latest JAR.
Maher

@TomasMikula
Copy link
Member

Can you provide more information, or, ideally, a runnable example? The Rich-text editor demo is wrapping lines for me with the latest jar.

@ghost
Copy link
Author

ghost commented Mar 13, 2014

Ok I think I found a bug. I think it does not wrap text after it was unwrapped.
Can you try toggling the wrapping?

Start condition: wrapped.

Then: Unwrapping: works as expected.

Then: Wrapping, does not work.

update:
I found it. It works if you enter new text. I guess there is an issue with refreshing.

@ghost ghost closed this as completed Mar 13, 2014
@TomasMikula
Copy link
Member

OK, what I observe is that after I toggle wrapping, I need to change the content (e.g. type a character) for the new wrapping mode to take effect. I'm on it.

@TomasMikula TomasMikula reopened this Mar 13, 2014
@ghost
Copy link
Author

ghost commented Mar 13, 2014

yes that was the solution I ended up doing. Just appended a white space to
whenever the toggle is pressed.

Just another quick question to confirm. I tested the richtext.replace()..
it does not seem to do what I am expecting it. at a first glance the code
logical, but i'll extensive checking today and let you know. In case you
can a quick test form your end please let me know as well.

On Thu, Mar 13, 2014 at 11:00 AM, TomasMikula [email protected]:

Reopened #20 #20.

Reply to this email directly or view it on GitHubhttps://github.com//issues/20
.

@TomasMikula
Copy link
Member

The method replace(from, to, styledDocument) is used by RichTextFX itself to implement undo/redo functionality and that works. Please, try not to mix different problems in a discussion of one issue.

@TomasMikula
Copy link
Member

I pushed a change that should make the changes of wrapTextProperty immediate, but it doesn't work because of this OpenJFX bug I reported a while ago.

@TomasMikula
Copy link
Member

I closed this for now. Until the above JavaFX issue is resolved, I just recommend not to toggle line wrapping once it's set.

@ghost
Copy link
Author

ghost commented Mar 15, 2014

Cool. currently I append a white space with the toggle and it refreshes
the wrapping . not cleanest solution but it works! I never appreciated
white space as much before!
On Mar 15, 2014 4:18 AM, "TomasMikula" [email protected] wrote:

I closed this for now. Until the above JavaFX issue is resolved, I just
recommend not to toggle line wrapping once it's set.

Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-37723318
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant