#2661·DearPyGui

get_item_parent does return tag instad of ID

Author: simonblum-dbCreated Jun 23, 2026Updated Jun 23, 2026
Labelstype: docsstate: pending

Dear PyGui version:

3.0.0

Python version:

3.11.9

Operating system:

Windows 11

My issue/question:

get_item_parent returns the parents tag (if there is one) instead of the parents ID as it is stated in the documentation. Either the documentation should be updated to reflect this API change or the method should be fixed to return the parents ID.

Steps to reproduce:

See minimal example below.

Expected behavior:

As per documentation get_item_parent should return the parents ID as int or None.

Screenshots:

N/A

Standalone, minimal, complete and verifiable example:

python
import dearpygui.dearpygui as dpg

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

with dpg.window(tag="minimal", label="minimal"):
    dpg.add_text("Hello world", tag="text")

dpg.show_viewport()

assert isinstance(x := dpg.get_item_parent("text"), int), f"get_item_parent returned {type(x)} instead of {int}"

dpg.start_dearpygui()
dpg.destroy_context()