Skip to content

Question: Append text with different style. #868

@bytecod3r

Description

@bytecod3r

Hi there,

I want to append texts with different style. E.g. the below code, I want the first "Hello" to be appended in bold, and the second "world" to in Italic, how can I set such styling for each append?
by the way, this library is awesome!

@FXML
private StyleClassedTextArea testTextArea;

void test(){
    testTextArea.appendText("Hello"); //to append Hello in Bold.
    testTextArea.appendText("World"); //to append Hello in Italic.
}

I tried looking into other issues and questions by others, but unfortunately didn't find the answer.

And second question, Which one is using less memory? InlineCssTextArea or StyleClassedTextArea or CodeArea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions