Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

default_open=True has no effect for collapsing_header #1327

Closed
pbk0 opened this issue Oct 14, 2021 · 3 comments
Closed

default_open=True has no effect for collapsing_header #1327

pbk0 opened this issue Oct 14, 2021 · 3 comments
Assignees
Labels
state: ready Fixed/Added and will be present in an upcoming release type: bug bug

Comments

@pbk0
Copy link
Contributor

pbk0 commented Oct 14, 2021

Version of Dear PyGui

Version: 1.0.0
Operating System: Windows 10

My Issue/Question

default_ope=True has no effect for collapsing_header

To Reproduce

Run below code

# Here's some code anyone can copy and paste to reproduce your issue
import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()

with dpg.window(label="Dear PyGui Demo", width=800, height=800,
                pos=(100, 100), tag="__demo_id"):
    with dpg.collapsing_header(label="some label", default_open=True,):
        dpg.add_text(default_value="Some text")

dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
@pbk0 pbk0 added state: pending not addressed yet type: bug bug labels Oct 14, 2021
@pbk0 pbk0 changed the title default_ope=True has no effect for collapsing_header default_open=True has no effect for collapsing_header Oct 14, 2021
@hoffstadt hoffstadt removed the state: pending not addressed yet label Oct 14, 2021
@hoffstadt
Copy link
Owner

@Pcothren did you fix this one?

@hoffstadt
Copy link
Owner

Fixed in next release.

@hoffstadt
Copy link
Owner

Regression test:

import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()

with dpg.window(label="Regression", width=800, height=800):

    dpg.add_button(label="open cp1", callback=lambda:dpg.set_value("cp", True))
    dpg.add_button(label="close cp1", callback=lambda:dpg.set_value("cp", False))

    with dpg.collapsing_header(label="cp1  (default close)", tag="cp"):
        dpg.add_text(default_value="Some text")

    with dpg.collapsing_header(label="cp2   (default open)", default_open=True):
        dpg.add_text(default_value="Some text")

dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()

@hoffstadt hoffstadt added the state: ready Fixed/Added and will be present in an upcoming release label Oct 15, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
state: ready Fixed/Added and will be present in an upcoming release type: bug bug
Projects
None yet
Development

No branches or pull requests

3 participants