From d55b2a9d18f1e92ebe1e70b3b3e49ed3a6a872b8 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 25 Feb 2014 19:05:01 -0500 Subject: Fixed up Grid and Space() documentation. --- stack.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'stack.go') diff --git a/stack.go b/stack.go index c01e9bd..269bee4 100644 --- a/stack.go +++ b/stack.go @@ -164,8 +164,12 @@ func (s *Stack) preferredSize() (width int, height int, err error) { return } -// Space returns a null control intended for padding layouts with blank space where otherwise impossible (for instance, at the beginning or in the middle of a Stack). -// In order for a Space to work, it must be marked as stretchy in its parent layout; otherwise its size is undefined. +// Space returns a null control intended for padding layouts with blank space. +// It appears to its owner as a control of 0x0 size. +// +// For a Stack, Space can be used to insert spaces in the beginning or middle of Stacks (Stacks by nature handle spaces at the end themselves). In order for this to work properly, make the Space stretchy. +// +// For a Grid, Space can be used to have an empty cell. (TODO stretching/sizing rules) func Space() Control { // As above, a Stack with no controls draws nothing and reports no errors; its parent will still size it properly if made stretchy. return NewStack(Horizontal) -- cgit v1.2.3