hoffstadt / hoffstadt/DearPyGui

Filling the viewport

Open
#2,628 2 comments 0 reactions 0 assignees View on GitHub
state: pending type: docs
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

**My comment**

Hello, not sure where to ask now that stackoverflow is not very popular, I reviewed the following documentation and attempted to make the demo fill the viewport, is this possible? I was not able to do it

**Necessary code**

From the documentation:

`# the window expands and fills the windows window (viewport)

import dearpygui.dearpygui as dpg

dpg.create_context()

with dpg.window(tag="Primary Window"):
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.create_viewport(title='Custom Title', width=600, height=200)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.set_primary_window("Primary Window", True)
dpg.start_dearpygui()
dpg.destroy_context()

`

attempt: trying to tag the demo window (not successful)

`
import dearpygui.dearpygui as dpg
import dearpygui.demo as demo

dpg.create_context()
dpg.create_viewport(title='Custom Title', width=600, height=600)

with demo.show_demo(tag="Primary Window"):
print("printing...")

dpg.setup_dearpygui()
dpg.show_viewport()
dpg.set_primary_window("Primary Window", True)
dpg.start_dearpygui()
dpg.destroy_context()

`

thanks in advance!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.