DearPyGui icon indicating copy to clipboard operation
DearPyGui copied to clipboard

Horizontal scrollbar for text inputs

Open KyleTheScientist opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

I am working on a text editor and the text regularly goes outside the width of the input field. I can scroll through the input field by using the arrow keys but my instinctual reaction is to try and scroll with shift+scroll wheel or the trackpad.

Describe the solution you'd like

A horizontal_scrollbar configuration for text inputs. If True, the input will get a scroll bar like the ones for windows when the width of the text content exceeds the width of the input item.

Additional context

I really appreciate the effort that has gone into this library. It's really the best GUI lib available for Python. I've tried so many other solutions and this one wipes the floor with them.

KyleTheScientist avatar Aug 22 '24 04:08 KyleTheScientist

Hello Kyle -

Just wanted to add some links here that explain why such an obvious feature is not there yet (not that you asked for explanation, but this info might be useful to whoever reads this ticket anyway).

In Dear ImGui repo, there were multiple requests for a horizontal scrollbar on multiline InputText widgets. Here are a couple of comments where Omar explains its performance implications: https://github.com/ocornut/imgui/issues/1224#issuecomment-315326864 https://github.com/ocornut/imgui/issues/383#issuecomment-2080428699

Also, here's a recent post where Omar speculates about the past and the future of Dear ImGui, and mentions a rewrite of InputText (see item 6.7), with one of the features being a horizontal scrollbar: https://github.com/ocornut/imgui/issues/7892

Note that it's not a short-term plan, but rather some priorities for future development.

v-ein avatar Aug 22 '24 06:08 v-ein

Thanks for the quick reply. I had seen the threads on multiline text wrapping and why that was not a trivial change, so this makes sense. Apologies for not searching for this issue without the is:open filter!

KyleTheScientist avatar Aug 22 '24 14:08 KyleTheScientist

Well, all those links are references to Dear ImGui, which is a different repo, so you should probably leave your ticket open.

v-ein avatar Aug 22 '24 15:08 v-ein