SetColAlignH sets the horizontal alignment for all the cells of the specified column. The function panics if the supplied column is invalid.
(col int, align Align)
| 90 | // SetColAlignH sets the horizontal alignment for all the cells of |
| 91 | // the specified column. The function panics if the supplied column is invalid. |
| 92 | func (g *GridLayout) SetColAlignH(col int, align Align) { |
| 93 | |
| 94 | if col < 0 || col >= len(g.columns) { |
| 95 | panic("Invalid column") |
| 96 | } |
| 97 | if g.columns[col].alignh == nil { |
| 98 | g.columns[col].alignh = new(Align) |
| 99 | } |
| 100 | *g.columns[col].alignh = align |
| 101 | g.Recalc(g.pan) |
| 102 | } |
| 103 | |
| 104 | // Recalc sets the position and sizes of all of the panel's children. |
| 105 | // It is normally called by the parent panel when its size changes or |