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

It is possible to reinitialize a table widget ? #623

Closed
1 of 13 tasks
TrueMisterJeanP opened this issue Oct 29, 2018 · 2 comments · Fixed by #2011
Closed
1 of 13 tasks

It is possible to reinitialize a table widget ? #623

TrueMisterJeanP opened this issue Oct 29, 2018 · 2 comments · Fixed by #2011
Labels
enhancement New features, or improvements to existing features.

Comments

@TrueMisterJeanP
Copy link

TrueMisterJeanP commented Oct 29, 2018

Hello,

I Will know if is it possible to change the headings of a table widget after having initialized it.

First:

self.table1 = toga.Table(
headings=[],
data=[],
style=Pack(flex=1),
on_select=self.on_select_row_handler
)

That produce a empty table and it is what I want.

Next:
To change the headings and the data i use this code but below it does not work:

    self.table1.headings = ['one', 'two']
    self.table1.data = [('1','2')]

It is possible to reinitialize a table widget ?

Thank you for your help.

Expected Behavior

Current Behavior

Steps to reproduce

Your Environment

  • Python Version (list the specific version number)
    python 3.7.1

  • Toga
    toga 0.30dev11

  • Operating System and Version (select from the following and list the specific version number; if your OS is not listed, list that as well)

    • macOS - version: Mojave
    • Linux - distro: - version:
    • Windows - version:
    • Other - name: - version:
  • Toga Target (the type of app you are trying to generate)

    • android
    • [x ] cocoa
    • django
    • gtk
    • iOS
    • tvOS
    • watchOS
    • winforms
    • win32
    • Other (please specify)
@freakboy3742
Copy link
Member

Thanks for the report. Is changing column headers currently possible? No - the API doesn't provide for changing column headers. Should it be possible? Yes. If you wanted to make an API proposal to make this possible, I'd be in favour.

@ghost ghost mentioned this issue Jun 6, 2019
4 tasks
@freakboy3742 freakboy3742 added enhancement New features, or improvements to existing features. up-for-grabs labels Mar 29, 2022
@freakboy3742
Copy link
Member

The ability to add columns was added in #820; #2011 modifies this to insert and remove columns.

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

Successfully merging a pull request may close this issue.

2 participants