SetAlignment sets the alignment of the *WidgetBase.
(alignment Alignment2D)
| 248 | |
| 249 | // SetAlignment sets the alignment of the *WidgetBase. |
| 250 | func (wb *WidgetBase) SetAlignment(alignment Alignment2D) error { |
| 251 | if alignment != wb.alignment { |
| 252 | if alignment < AlignHVDefault || alignment > AlignHFarVFar { |
| 253 | return newError("invalid Alignment value") |
| 254 | } |
| 255 | |
| 256 | wb.alignment = alignment |
| 257 | |
| 258 | wb.RequestLayout() |
| 259 | } |
| 260 | |
| 261 | return nil |
| 262 | } |
| 263 | |
| 264 | // SetMinMaxSize sets the minimum and maximum outer size of the *WidgetBase, |
| 265 | // including decorations. |
nothing calls this directly
no test coverage detected