giu icon indicating copy to clipboard operation
giu copied to clipboard

[Feature Request] Highlight Multiline Text

Open Naatan opened this issue 3 years ago • 4 comments

Related problem

No response

Your request

I'd like to be able to highlight individual words / sentences within the rendered text of a InputTextMultiline field.

I've tried using imgui.PushStyleColor, but that did nothing. I assume this is intended for individual widgets.

Alternative solution

No response

Additional context

No response

Naatan avatar Mar 27 '22 21:03 Naatan

Hi there! could you provide more details about your use case? what do you mean by "highlighting text"?

gucio321 avatar Mar 28 '22 07:03 gucio321

I think @Naatan means the Code Editor. Currently it is a Code Editor Widget but you will have to write your own syntax highlighter which is a bit complex.

AllenDang avatar Mar 28 '22 09:03 AllenDang

I'm looking for something possibly a little less complex than the code editor with custom syntax highlighting. I'd like to be able to highlight different ranges within a multi line text field, which basically means coloring text manually by range.

Basically my use-case is similar to when you hit ctrl+f in your editor to search for strings; I want to be able to highlight text just like that.

image

Naatan avatar Mar 28 '22 15:03 Naatan

@Naatan Current InputTextMultiline doesn't support to hightlight anything, and there is no easy way to implement it for now.

AllenDang avatar Mar 29 '22 02:03 AllenDang