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

Add headers to table/tree widget #1658

Closed
benoitkugler opened this issue Dec 15, 2020 · 4 comments
Closed

Add headers to table/tree widget #1658

benoitkugler opened this issue Dec 15, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@benoitkugler
Copy link

Is your feature request related to a problem? Please describe:

I would like to title the columns of a table and to (externally) sort the rows when the header is clicked.

Is it possible to construct a solution with the existing API?

I think we can build a pseudo header with a second table, but it's not very clean. Especially, the possible horizontal scrolling need to synchronized.

Describe the solution you'd like to see:

The possibility to add headers (possibly both horizontal and vertical) to the table widget.
Ideally, horizontal headers could also be added to the tree widget.

They should provide a way to handle tap events, so that we can then sort the data, or maybe select all the column/row.
The sorting (or any other event handling) should probably stay external to keep things simple and allow maximum customization, I mentioned it as an example/motivation.

@PaulWaldo
Copy link

I have created an implementation that is helping me to achieve this, please see
https://github.com/PaulWaldo/fyne-headertable.
It's a bit rough around the edges, but it may help. If you have any suggestions to better it, please let me know.

@cristim
Copy link

cristim commented Jan 23, 2023

@PaulWaldo I wanted to use your little library, seemed neat, but then I realized it's distributed under GPL so it can't be used for non-GPL software. Too bad.

@andydotxyz andydotxyz self-assigned this Mar 22, 2023
@andydotxyz
Copy link
Member

Thanks to support by https://mindpointgroup.com I will be implementing table headers ASAP :)

@andydotxyz andydotxyz added this to the Dalwhinnie (May/June 2023) milestone Mar 22, 2023
andydotxyz pushed a commit to andydotxyz/fyne that referenced this issue Mar 28, 2023
This adds a row and column headers with a sensible default look.
The header widget can be overridden using  and  matching the cell semantics.

See fyne-io#1658, fyne-io#3594
@andydotxyz
Copy link
Member

Headers are now in, and can be tapped if you insert Buttons using CreateHeader and UpdateHeader callbacks which will replace the default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants