Add `titles` as a __init__ trait
See original GitHub issueI find it quite unpythonic to have to write
tabs = w.Tab(children=outputs)
for i, title in enumerate(titles):
tabs.set_title(i, title)
Where, we should just be able to write:
tabs = w.Tab(children=outputs, titles=titles)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Trait Manager - GrapesJS
Add Traits to Components · Built-in trait types. Text; Number; Checkbox; Select; Color; Button · Updating traits at run-time · Define new Trait...
Read more >How to initialize trait's vals in subtrait? - scala - Stack Overflow
I tried using an abstract val in a trait to initialize another value. I got a NullPointerException . I boiled the behaviour down...
Read more >UITraitCollection | Apple Developer Documentation
The UITraitCollection class includes four specialized constructors as well as a constructor that lets you combine an array of trait collections, init(traitsFrom ...
Read more >Introduction to Trait Editor Factories — TraitsUI 7 Documentation
A List trait can be edited by means of ListEditor, TableEditor (if the List elements are HasTraits objects), CheckListEditor or SetEditor.
Read more >Traits | Larawiz Documentation - GitHub Pages
Just put the traits in a list below the uses key. These will be added to any existing trait of the model, and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1. It’s bothered me for a long time that we have get_title and set_title.
Additionally, looking at the code, it’s weird that titles is a dictionary indexed with integers, instead of just a tuple corresponding to the children. I think we could expose a tuple interface to users (along with constructor attribute) in a backwards-compatible way (i.e., changes to the tuple would change the dict that is synced), and we could eliminate the dict in 8.0.
@CatChenal - make sure you are looking at the stable docs for ipywidgets 7.x. The development docs are for ipywidgets 8.