How to change window scale? #1990
Answered
by
Automation-py
Nikasyauskas
asked this question in
Support
-
Beta Was this translation helpful? Give feedback.
Answered by
Automation-py
Jan 3, 2023
Replies: 2 comments
-
I don't know if this answers your question but what you can do is the followingSet the windows size like the followingdpg.create_viewport(title='Custom Title', width=800, height=500) #change the width, height to your liking Then on your dpg.window(label="Example Window") set a tag like the followingdpg.window(label="Example Window", tag="fullscreen") #the tag can be any string you want Finally copy/paste the following codedpg.set_primary_window("fullscreen", True) #paste it under dpg.setup_dearpygui() Complete codeimport dearpygui.dearpygui as dpg
dpg.create_context()
dpg.create_viewport(title='Custom Title', width=600, height=300)
with dpg.window(label="Example Window", tag="fullscreen"):
dpg.add_text("Hello, world")
dpg.add_button(label="Save")
dpg.add_input_text(label="string", default_value="Quick brown fox")
dpg.add_slider_float(label="float", default_value=0.273, max_value=1)
dpg.setup_dearpygui()
dpg.set_primary_window("fullscreen", True)
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context() Result |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Nikasyauskas
-
For font size you can use the followingdpg.set_global_font_scale(1) # change the value 1 for bigger size font |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't know if this answers your question but what you can do is the following
Set the windows size like the following
Then on your dpg.window(label="Example Window") set a tag like the following
Finally copy/paste the following code
Complete code