hoffstadt / hoffstadt/DearPyGui

`hide_item()` has a non-existent `children_only` parameter

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

Description

## Version of Dear PyGui

Version: 1.8.0
Operating System: Windows 10

## My Issue/Question

Docs and Intellisense both list a `children_only` parameter for `dpg.hide_item()`. However, calling the function with either True or False passed to that parameter causes an exception to be raised.

## To Reproduce

```py
dpg.hide_item(item, children_only=True)
```
>Exception:
>Error: [1005]
>Command: configure_item
>Item: 0
>Label: Not found
>Item Type: Unknown
>Message: Item not found: 0
>
>The above exception was the direct cause of the following exception:
>...
>internal_dpg.configure_item(child, show=False)
>SystemError: returned a result with an exception set

```py
dpg.hide_item(item, children_only=False)
```
> TypeError: hide_item() missing 1 required positional argument: 'item'

## Expected behavior

The given item's children get hidden, or the item itself gets hidden.

## Screenshots/Video

![image](https://user-images.githubusercontent.com/39402973/211866817-674ea4ca-9ac9-431c-86ff-ae7f2c65ba42.png)
![image](https://user-images.githubusercontent.com/39402973/211866908-ab0032fe-84a7-47ec-a65d-aa9d22c00968.png)

## Standalone, minimal, complete and verifiable example

```py
import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport(width=500, height=500)

with dpg.window(tag="window"):
dpg.add_text("Hello World")
dpg.add_text("Goodbye World")

dpg.hide_item("window", children_only=True)
dpg.hide_item("window", children_only=False)

dpg.hide_item()
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
```

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.