PanelView.st
changeset 127 462396b08e30
parent 125 3ffa271732f7
child 146 7726707ac980
--- a/PanelView.st	Wed May 10 04:30:46 1995 +0200
+++ b/PanelView.st	Fri May 12 20:25:18 1995 +0200
@@ -24,7 +24,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg/PanelView.st,v 1.9 1995-05-09 01:56:22 claus Exp $
+$Header: /cvs/stx/stx/libwidg/PanelView.st,v 1.10 1995-05-12 18:24:47 claus Exp $
 '!
 
 !PanelView class methodsFor:'documentation'!
@@ -45,13 +45,13 @@
 
 version
 "
-$Header: /cvs/stx/stx/libwidg/PanelView.st,v 1.9 1995-05-09 01:56:22 claus Exp $
+$Header: /cvs/stx/stx/libwidg/PanelView.st,v 1.10 1995-05-12 18:24:47 claus Exp $
 "
 !
 
 documentation
 "
-    this is a view for holding subviews. (layout-widget ?!!)
+    this is a view for holding subviews. (layout-widget ?)
 
     Instances of PanelView try to get all their subviews into them,
     arranging subviews left-to-right, top-to-bottom.
@@ -59,6 +59,12 @@
     If you dont like its layout, define a new subclass or use one of
     the existing subclasses: HorizontalPanelView and VerticalPanelView.
 
+    The panel assumes, that the elements do not resize themselfes, after it
+    became visible. This is not true for all widgets (buttons or labels may
+    like to change). If you have changing elements, tell this to the panel
+    with 'aPanel elementsChangeSize:true'. In that case, the panel will react
+    to size changes, and reorganize things.
+
     PanelViews normally delay the actual positioning/sizing of their elements,
     until actually displayed. This is useful, if more elements are to
     be added, to avoid repeated configuration of the elements.
@@ -92,6 +98,27 @@
 			<Boolean>       if true, the panel takes care of this situation.
 					By default, this is false.
 "
+!
+
+examples
+"
+    fill a panel with many buttons (see what happens on resize):
+
+	|top panel|
+
+	top := StandardSystemView new.
+	top extent:200@200.
+	panel := PanelView origin:0.0@0.0 corner:1.0@1.0 in:top.
+
+	#('one' 'two' 'three' 'four' 'five' 'six' 'seven' 'eight'
+	  'nine' 'ten' 'aVeryLongOne') do:[:label |
+	    |b|
+
+	    b := Button label:label.
+	    panel add:b.
+	].
+	top open
+"
 ! !
 
 !PanelView methodsFor:'event processing'!