Skip to content

Widget to fill parent window width #1517

Answered by JKHans
retifrav asked this question in Support
Discussion options

You must be logged in to vote

Hi @retifrav,

What you are looking for is width=-1

By the way, the same applies to height=-1, but not all widgets support that size policy.

dpg.add_input_text(default_value="Input text using full parent width", width=-1)

Please also have a look to the dearpygui integrated demo (Layout & Scrolling):

import dearpygui.demo as dpd
...
dpd.show_demo()

It seems that up to now, nowhere else in the documentation this "-1" size policy is mentioned explicitly.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by retifrav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants