DearPyGui icon indicating copy to clipboard operation
DearPyGui copied to clipboard

Individual row and cell theme coloring request

Open tmorgan497 opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. It appears there's not currently a way to individually apply themes to rows or cells.

Describe the solution you'd like Add a way to bind item themes to individual cells and rows

Describe alternatives you've considered I am currently using text colors for this in .add_text(color=...)

Additional context Example code:

import dearpygui.dearpygui as dpg

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

with dpg.theme() as table_row_bg_green:
    with dpg.theme_component(dpg.mvAll):
        dpg.add_theme_color(
            dpg.mvThemeCol_TableRowBg, (0, 200, 0, 255),
            category=dpg.mvThemeCat_Core)

with dpg.window(width=500, height=500):
    with dpg.table(row_background=True):
        dpg.add_table_column()
        with dpg.table_row(tag='row1'):
            dpg.add_text('row1')
        with dpg.table_row(tag='row2'):
            dpg.add_text('row2')

    dpg.bind_item_theme('row1', table_row_bg_green)

dpg.start_dearpygui()
dpg.destroy_context()

tmorgan497 avatar May 25 '22 18:05 tmorgan497