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

Can't set Font of StyleClassedTextArea #125

Closed
YavuzDev opened this issue Mar 8, 2015 · 5 comments
Closed

Can't set Font of StyleClassedTextArea #125

YavuzDev opened this issue Mar 8, 2015 · 5 comments

Comments

@YavuzDev
Copy link

YavuzDev commented Mar 8, 2015

Hello i'm doing this:

    area.setFont(Font.font(20));

But nothing happens the font stays the same.

This is my StyleClassesTextArea:

private StyleClassedTextArea area = new StyleClassedTextArea();

And i'm called the setFont method in the start method above stage.show();

@TomasMikula
Copy link
Member

Hi, use this instead:

area.setStyle("-fx-font-size: 20;");

Maybe I should just remove fontProperty on text area altogether.

@JordanMartinez
Copy link
Contributor

I just created a branch to remove this. However, if the skin is going to be removed (#206), would it actually be worth it to keep the fontProperty?

@TomasMikula
Copy link
Member

Removing the skin doesn't make much difference here. Propagating the font down to individual Text nodes would still be cumbersome. My stance is that if font is configurable via style (i.e. via S or PS in StyledTextArea<S, PS>), then use that. Otherwise, use the above workaround.

@JordanMartinez
Copy link
Contributor

I believe this issue can be closed now.

@TomasMikula
Copy link
Member

Yes, thank you.

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

No branches or pull requests

3 participants