VerticalPanelView.st
changeset 131 208fa92f434d
parent 130 338e856bddc9
child 133 e58c7c979f33
--- a/VerticalPanelView.st	Tue Jun 06 06:16:07 1995 +0200
+++ b/VerticalPanelView.st	Tue Jun 27 04:24:41 1995 +0200
@@ -23,7 +23,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.11 1995-06-06 04:15:38 claus Exp $
+$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.12 1995-06-27 02:24:25 claus Exp $
 '!
 
 !VerticalPanelView class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.11 1995-06-06 04:15:38 claus Exp $
+$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.12 1995-06-27 02:24:25 claus Exp $
 "
 !
 
@@ -408,6 +408,26 @@
 	v open
 
 
+    example: combine fully fitSpace with scaling button labels
+
+	|v p b1 b2 b3|
+
+	v := StandardSystemView new.
+	v label:'vL=fitSpace; hL=fitSpace'.
+	p := VerticalPanelView in:v.
+	p verticalLayout:#fitSpace.
+	p horizontalLayout:#fitSpace.
+	p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
+	b1 := Button label:'button1' in:p.
+	b1 adjust:#fit.
+	b2 := Button label:'butt2' in:p.
+	b2 adjust:#fit.
+	b3 := Button label:'button3' in:p.
+	b3 adjust:#fit.
+	v extent:100 @ 300.
+	v open
+
+
     example: from top, each at left:
 
 	|v p b1 b2 b3|
@@ -782,6 +802,13 @@
 	]
     ] ifFalse:[
 	sumOfHeights := sumOfHeights + ((subViews size - 1) * verticalSpace).
+	vLayout == #topSpace ifTrue:[
+	    sumOfHeights := sumOfHeights + verticalSpace
+	] ifFalse:[
+	    ((vLayout == #center) or:[vLayout == #spread]) ifTrue:[
+		sumOfHeights := sumOfHeights + (verticalSpace * 2)
+	    ]
+	].
     ].
 
     ((hLayout == #leftSpace) or:[hLayout == #rightSpace]) ifTrue:[