pytermgui
pytermgui copied to clipboard
[BUG] Multiline InputField fails to display correctly a in scrollable container
Describe the bug
The InputField is not working correctly when it is created inside an container with overflow=ptg.Overflow.SCROLL
. When Multiline is enabled it is only one big line and I am not able to modify it. When I set the value inside the function signature it does not change anything and the value does not appear.
To Reproduce
- Make a window
- Insert into the window a container with
overflow=ptg.Overflow.SCROLL
- Insert into this container a multiline InputField with a default value
Expected behavior I have a multiline input field where the user is able to scroll if the input field gets to big
Screenshots
Dont worry about the screenshot. The data is public.
How it should look
How it is looking
System information
❯ ptg --version
PyTermGUI version 7.7.1
System details:
Python version: 3.12.3
$TERM: xterm-256color
$COLORTERM: truecolor
Color support: ColorSystem.TRUE
OS Platform: Linux-6.8.7-arch1-2-x86_64-with-glibc2.39
Hey, sorry for the delay! University graduation got in the middle of things.
Could you provide a reproducible example? IIRC height management of InputFields isn't perfect, so just manually adjusting it might be helpful. Beyond that I'd need to dive into an example to figure it out.
Thank you!
No problem, I know the struggle. Here is the example
#!/bin/python
import pytermgui as gui
with gui.WindowManager() as manager:
manager.layout.add_slot("body")
manager.add(
gui.Window(
gui.Container("Test Container", gui.InputField("Waku waku", multiline=True), overflow=gui.Overflow.SCROLL)
)
)