PlaceWidget places the provided widget into the container. The use of this option removes any sub containers. Containers with sub containers cannot have widgets.
(w widgetapi.Widget)
| 461 | // The use of this option removes any sub containers. Containers with sub |
| 462 | // containers cannot have widgets. |
| 463 | func PlaceWidget(w widgetapi.Widget) Option { |
| 464 | return option(func(c *Container) error { |
| 465 | c.opts.widget = w |
| 466 | c.first = nil |
| 467 | c.second = nil |
| 468 | return nil |
| 469 | }) |
| 470 | } |
| 471 | |
| 472 | // MarginTop sets reserved space outside of the container at its top. |
| 473 | // The provided number is the absolute margin in cells and must be zero or a |