Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tables API #64

Closed
Pcothren opened this issue Aug 9, 2020 · 0 comments · Fixed by #65
Closed

Tables API #64

Pcothren opened this issue Aug 9, 2020 · 0 comments · Fixed by #65

Comments

@Pcothren
Copy link
Collaborator

Pcothren commented Aug 9, 2020

Version of Dear PyGui:

Version: 0.1.0b0

OS

Operating System: Windows 10 Home 10.0.18363

My Issue/Question

The method get_table_selection() replies with a list of cell coordinates. (list[ list[ float, float ] ] )
when sending these coordinates into the get_table_item it takes in a list of integers

Expected behavior

Suggestion is to change the get_table_selection() to reply with (list[ list[ int, int] ] ) since cells only exist in integer coordinates anyway.

Standalone, minimal, complete and verifiable example:

from dearpygui.dearpygui import *

show_metrics()
show_documentation()
add_table("Table Example", ["Header 0", "Header 1"], callback="tablePrinter")
insert_row("Table Example", 0, ["row 0", "text"])


def tablePrinter(sender, data):
    coordList = get_table_selections("Table Example")
    print("Selected Cells (coordinates): ", coordList)
    names = []
    for coordinates in coordList:
        names.append(get_table_item("Table Example", coordinates[0], coordinates[1]))
    print(names)


start_dearpygui()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant