Make modifying layout easier
See original GitHub issueCurrently it’s not very convenient to change something in a widget layout, especially if you need to change several properties, for example:
w = Button()
w.layout.width = '100px'
w.layout.height = '50px'
It could look much better:
w = Button().with_layout(width='100px', height='50px')
Personally I now use dumb monkey-patching for this:
def _with_layout(self, **kwargs):
for k, v in kwargs.items():
setattr(self.layout, k, v)
return self
iw.DOMWidget.with_layout = _with_layout
and would really like to see something like this in ipywidgets
!
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
5 simple tips to making responsive layouts the easy way
FREE COURSE: Conquering Responsive Layouts https://courses.kevinpowell.co/conquering-responsive- layouts Links ✓ min(), max(), ...
Read more >Google Slides: Editing Master Slides and Layouts - GCF Global
Customizing slide layouts You can use the master template editor to modify any slide layout in your presentation. It's easy to make small...
Read more >Edit and re-apply a slide layout - Microsoft Support
Change an existing layout · On the View tab, click Slide Master. · In the thumbnail pane that contains the slide masters and...
Read more >Changing layout is difficult or easy in LaTeX? - TeX
Well, the design of a good layout takes time and more importantly skill. Just switching layouts usually is easy, even though there might...
Read more >Simple Edit Layout - Squiz Matrix 5 Documentation
The Simple Edit Layout asset allows you to customise the layout of the fields in the Simple Edit Interface. Each Simple Edit Layout...
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
@gwvr - thanks for bringing this up. This is a separate request from the one on this issue, so I’ve opened a new issue for your comment. Can we continue discussion there? #910.
Fixed by #961.