AttributeError: __enter__ dearpygui tabs

  dearpygui, python, python-3.x

i was trying to use tabs in dearpygui and it gives me
this error:

Traceback (most recent call last):
  File "c:main.py", line x, in <module>
    with dpg.add_tab_bar():
AttributeError: __enter__

i tried to do it like this

add_tab_bar('tabbar')

add_tab('tab1')

end_tab()

end_tab_bar()

id didnt work to

the code:

import dearpygui.dearpygui as dpg

with dpg.window(label="window") as mainwind:
    with dpg.add_tab_bar():
        with dpg.add_tab(label='tab1'):
            dpg.add_checkbox(label='checkbox')
        


dpg.start_dearpygui()

Source: Python Questions

LEAVE A COMMENT