LSelBox.st
changeset 125 3ffa271732f7
parent 122 04ec3fda7c11
child 128 06a050529335
--- a/LSelBox.st	Mon May 08 17:19:27 1995 +0200
+++ b/LSelBox.st	Tue May 09 03:57:16 1995 +0200
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1990 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg/Attic/LSelBox.st,v 1.11 1995-05-07 00:16:17 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/LSelBox.st,v 1.12 1995-05-09 01:55:56 claus Exp $
 '!
 
 !ListSelectionBox class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libwidg/Attic/LSelBox.st,v 1.11 1995-05-07 00:16:17 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/LSelBox.st,v 1.12 1995-05-09 01:55:56 claus Exp $
 "
 !
 
@@ -111,7 +111,7 @@
 !ListSelectionBox methodsFor:'initialization'!
 
 initialize
-    |space2 v|
+    |space2 halfSpace v|
 
     super initialize.
 
@@ -122,21 +122,22 @@
     "self height:(height + (font height * 5)).  "
 
     space2 := 2 * ViewSpacing.
+    halfSpace := ViewSpacing // 2.
 
     v := ScrollableView for:(self class listViewType) in:self.
 
     "kludge: see note in EnterBox"
-    v origin:(0.0 
-	      @
-	      (enterField origin y + enterField height + ViewSpacing)).
-    v extent:(1.0
-	      @ 
-	      (height  
-	       - ViewSpacing - labelField heightIncludingBorder
-	       - ViewSpacing - enterField heightIncludingBorder
-	       - buttonPanel heightIncludingBorder - ViewSpacing
-	       - space2)
-	     ).
+"/    v origin:(0.0 
+"/              @
+"/              (enterField origin y + enterField height + ViewSpacing)).
+"/    v extent:(1.0
+"/              @ 
+"/              (height  
+"/               - ViewSpacing - labelField heightIncludingBorder
+"/               - ViewSpacing - enterField heightIncludingBorder
+"/               - buttonPanel heightIncludingBorder - ViewSpacing
+"/               - space2)
+"/             ).
     v origin:[0.0
 	      @
 	      (enterField origin y + enterField height + ViewSpacing)]
@@ -148,7 +149,7 @@
 	       - buttonPanel heightIncludingBorder - ViewSpacing
 	       - space2)
 	     ].
-    v leftInset:ViewSpacing//2; rightInset:ViewSpacing//2.
+    v leftInset:halfSpace; rightInset:halfSpace.
 
     selectionList := v scrolledView.
 
@@ -188,19 +189,21 @@
 
 preferedExtent
     "return my prefered extent - thats the minimum size 
-     to make everything visible"
+     I like to have, to make everything visible"
 
     |wWanted hWanted|
 
+
     wWanted := labelField width + ViewSpacing + ViewSpacing.
     (wWanted > width) ifFalse:[
 	wWanted := width
     ].
+
     hWanted := ViewSpacing + labelField height +
 	       ViewSpacing + enterField height +
 	       ViewSpacing + selectionList height +
 	       ViewSpacing + buttonPanel preferedExtent y +
-	       ViewSpacing.
+	       ViewSpacing - (ViewSpacing * 2).
 
     (hWanted < height) ifTrue:[
 	hWanted := height