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

Added new Tableview widget and tableview module #110

Merged
merged 21 commits into from Jan 3, 2022
Merged

Conversation

israel-dryer
Copy link
Owner

The new tableview module includes the new Tableview class and several other related classes.

This is a wrapper on the Treeview widget with built-in functionality such a searching, sorting, and various other functions available via right-click menus on the header and cells.

Data can be loaded via the widget constructor or with insert_row and insert_column methods.

I've added methods to autoalign and autofit the columns to the data.

@israel-dryer israel-dryer merged commit 3bbb6d0 into master Jan 3, 2022
@israel-dryer israel-dryer deleted the data-table branch January 3, 2022 05:31
@israel-dryer israel-dryer linked an issue Jan 3, 2022 that may be closed by this pull request
@antrrax
Copy link
Contributor

antrrax commented Jan 3, 2022

I did some tests (Linux Mint x64 Cinnamon X11), some suggestions for change:

Sorting image was cut off when doing autofit_columns. I changed
pad = utility.scale_size(self, 10)

for this and fixed the problem:
pad = utility.scale_size(self, 20)


Changed menu post method to tk_popup, several lines. Thus, the dropdown menu is displayed when hovering over the parent.
And mainly the menu is closed when clicking anywhere on the screen outside of it

example:
def post(self, event):

to: (in every 'post' to tk_popup)
def tk_popup(self, event):


I also changed the way to write csv.

writer = csv.writer(f)

for

CSV_DELIMITER = ';'
CSV_QUOTECHAR = '"'
writer = csv.writer(f, delimiter=CSV_DELIMITER, quotechar=CSV_QUOTECHAR, quoting=csv.QUOTE_NONNUMERIC)

Because depending on the country's local currency, using ',' as a delimiter can cause csv conflicts
ex: In Brazil the float separator is ',' and not '.'

bugs:
https://www.mediafire.com/file/0oil09c4i9vcif6/bug_tableview.mp4/file

modified:
https://www.mediafire.com/file/50e4b5qog148l9u/modified_tableview.mp4/file


There is also a bug with 'hide select rows'.
After applying this filter and trying to clean. It does not return the hidden line.
https://www.mediafire.com/file/hyhakz2oyi8lmd3/bug_hide.mp4/file

Another problem if the user hides all the rows there is no way for him to reload the data. It would be nice to have a reload/refresh data button as suggested before

reload


A complement.

The header separator could be in a different color than the header. For the program user, it is difficult to identify where this separator to double-click

separator

See the image. When the program is loaded. The separator is in an unexpected position for the user to find. If the separator were a line with a different color from the header, it would be easier to find.

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 this pull request may close these issues.

add DataTable widget
2 participants