Ayomide

    Ayomide

    1 year ago
    Hi, this question is more about guidance because I'm not sure where to start. I have a
    TextField
    , and to highlight of the text with colours, say given a list of words to highlight. Basically - syntax highlighting. The image attached gives you an idea of what I mean. Would I have to make my own
    TextField
    component for this?
    Dominaezzz

    Dominaezzz

    1 year ago
    Have a look at
    VisualTransformation
    for adding colours.
    Timo Drick

    Timo Drick

    1 year ago
    Ayomide

    Ayomide

    1 year ago
    Oh, I had no idea about the Compose Desktop examples. Thanks!
    Timo Drick

    Timo Drick

    1 year ago
    It uses a Text element not TextField but i think the highliting also works in TextField. See: EditorView.kt:LineContent
    Siyamed

    Siyamed

    1 year ago
    We don't have support for multi-style text editing yet, hopefully soon this would be possible without VisualTransformation.