-
I tried to implement a toolbar, in theory it works great, but the max _size gets ignored every other frame. import dearpygui.dearpygui as dpg
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.group(horizontal=True):
dpg.add_button(label="Button 1")
dpg.add_button(label="Button 2")
dpg.create_viewport(title='Custom Title', width=800, height=600)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context() |
Beta Was this translation helpful? Give feedback.
Answered by
BenBE
Sep 26, 2023
Replies: 1 comment
-
Specifying --- 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")
dpg.add_button(label="Button 2") |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Ol1B
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Specifying
min_size=[0,0]
in thedpg.window
context call seems to resolve the issue: