NewGridLayout creates and returns a pointer of a new grid layout
(ncols int)
| 34 | |
| 35 | // NewGridLayout creates and returns a pointer of a new grid layout |
| 36 | func NewGridLayout(ncols int) *GridLayout { |
| 37 | |
| 38 | if ncols <= 0 { |
| 39 | panic("Invalid number of columns") |
| 40 | } |
| 41 | gl := new(GridLayout) |
| 42 | gl.columns = make([]colInfo, ncols) |
| 43 | return gl |
| 44 | } |
| 45 | |
| 46 | // SetAlignV sets the vertical alignment for all the grid cells |
| 47 | // The alignment of an individual cell can be set by settings its layout parameters. |