Better documentation for Grid.

Noting restriction of max height/width and what happens if all widths /
heights are less than 100%.
This commit is contained in:
Jakub Sobon 2019-03-11 22:02:49 -04:00
parent c0a069c153
commit ab013dd021
No known key found for this signature in database
GPG Key ID: F2451A77FB05D3B7
1 changed files with 6 additions and 2 deletions

View File

@ -232,7 +232,9 @@ func (w *widget) String() string {
func (widget) isElement() {}
// RowHeightPerc creates a row of the specified height.
// The height is supplied as height percentage of the outer container.
// The height is supplied as height percentage of the parent element.
// The sum of all heights at the same level cannot be larger than 100%. If it
// is less that 100%, the last element stretches to the edge of the screen.
// The subElements can be either a single Widget or any combination of Rows and
// Columns.
func RowHeightPerc(heightPerc int, subElements ...Element) Element {
@ -243,7 +245,9 @@ func RowHeightPerc(heightPerc int, subElements ...Element) Element {
}
// ColWidthPerc creates a column of the specified width.
// The width is supplied as width percentage of the outer container.
// The width is supplied as width percentage of the parent element.
// The sum of all widths at the same level cannot be larger than 100%. If it
// is less that 100%, the last element stretches to the edge of the screen.
// The subElements can be either a single Widget or any combination of Rows and
// Columns.
func ColWidthPerc(widthPerc int, subElements ...Element) Element {