Skip to content

Window height automatically reset above max height every other frame #2186

Answered by BenBE
Ol1B asked this question in Support
Discussion options

You must be logged in to vote

Specifying min_size=[0,0] in the dpg.window context call seems to resolve the issue:

--- dpg-toolbar.py      2023-09-26 14:14:14 +0000
+++ dpg-toolbar.py      2023-09-26 14:14:15 +0000
@@ -2,7 +2,7 @@
 
 dpg.create_context()
 
-with dpg.window(tag="Toolbar", height=20, width=30000, max_size=[30000, 20], no_close=True, no_collapse=True, no_title_bar=True, no_resize=True, no_move=True, pos=[0, 20]):
+with dpg.window(tag="Toolbar", height=20, width=30000, min_size=[0,0], max_size=[30000, 20], no_close=True, no_collapse=True, no_title_bar=True, no_resize=True, no_move=True, pos=[0, 20]):
             with dpg.group(horizontal=True):
                 dpg.add_button(label="Button 1")
          …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Ol1B
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