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

Horizontal scrollbar for text inputs #2381

Open
KyleTheScientist opened this issue Aug 22, 2024 · 3 comments
Open

Horizontal scrollbar for text inputs #2381

KyleTheScientist opened this issue Aug 22, 2024 · 3 comments
Labels
state: pending not addressed yet

Comments

@KyleTheScientist
Copy link

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 KyleTheScientist added the state: pending not addressed yet label Aug 22, 2024
@v-ein
Copy link
Contributor

v-ein commented Aug 22, 2024

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:
ocornut/imgui#1224 (comment)
ocornut/imgui#383 (comment)

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:
ocornut/imgui#7892

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

@KyleTheScientist
Copy link
Author

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!

@v-ein
Copy link
Contributor

v-ein commented Aug 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: pending not addressed yet
Projects
None yet
Development

No branches or pull requests

2 participants