Add widget as table element
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 827
- Avg merge
- 9h 45m
- Merged PRs (30d)
- 58
Description
## Expected Behavior
I want to add a table with Toga that one of its columns is a column of switches (checkboxes).
When I run the application, instead of putting the checkboxes in the desired column, it writes its representation string.
Is there any way you can fix that?
Example code:
```python
data = [
["a", "b", c"],
["d", "e", f"]
["g", "h", i"]
]
table = toga.Table(
headings=["choose", "1", "2", "3"]
style=Pack(flex=1),
)
for record in data:
checkbox = toga.Switch(label="label")
table.data.append(checkbox, *record)
main_box.add(table)
main_window.content = main_box
```
## Your Environment
* Python Version 3.7
* Operating System and Version
- [ ] macOS - version:
- [ ] Linux - distro: - version:
- [X] Windows - version:
- [ ] Other - name: - version:
* Toga Version 0.3.0.dev19
* Toga Target (the type of app you are trying to generate)
- [ ] android
- [ ] cocoa
- [ ] django
- [ ] gtk
- [ ] iOS
- [ ] tvOS
- [ ] watchOS
- [ ] winforms
- [X] win32
- [ ] Other (please specify)
Contributor guide
Research direction
Start by reproducing the provided Toga Table and Switch example on the Windows win32 target, then trace how table cell values are rendered. Done means a Switch supplied as a table cell appears as a checkbox in its column instead of being converted to its representation string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100