hoffstadt / hoffstadt/DearPyGui

Selectable Tree Node

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

Description

## Version of Dear PyGui

Version: 2.0.0
Operating System: Arch 6.5.3

## My Issue/Question

After creating 'selectable' tree node, the tree node seems to remain unselectable.

## To Reproduce

Steps to reproduce the behavior:
1. Click on a tree node to select it.
2. Move cursor off of tree node to see it was not selected.

## Expected behavior

Clicking on a selectable leaf tree node should select the tree node until clicked again to deselect it.
Clicking on a selectable non-leaf tree node should select the tree node and children nodes until clicked again to deselect the tree node and children nodes. If children nodes are selected via a parent node they should be able to be deselected individually.

## Screenshots/Video

![Image](https://github.com/user-attachments/assets/6f1fb98b-c163-4f3d-88a6-cc032e6e14b9)

## Standalone, minimal, complete and verifiable example

```python
# 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="tutorial"):
with dpg.tree_node(label="Root node", selectable=True):
dpg.add_tree_node(label="Leaf node", selectable=True, leaf=True)

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.