FramedBox.st
changeset 3672 46c56ea54ef9
parent 2947 31726ebce2a4
child 3673 e1c29dd73768
--- a/FramedBox.st	Fri Jul 18 11:39:13 2008 +0200
+++ b/FramedBox.st	Fri Jul 18 11:41:59 2008 +0200
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libwidg' }"
 
 SimpleView subclass:#FramedBox
@@ -311,7 +310,7 @@
      if false, oly the label is shown.
      OBSOLETE; use #showFrame."
 
-    ^ showFrame
+    ^ self showFrame
 !
 
 horizontalSpace
@@ -384,7 +383,8 @@
     "define the position of the label;
      aSymbol may be one of: 
         #topLeft, #topCenter, #topRight;
-        #bottomLeft, #bottomCenter or #bottomRight"
+        #bottomLeft, #bottomCenter or #bottomRight
+        #hidden"
 
     labelPosition ~~ aSymbol ifTrue:[
         labelPosition := aSymbol.
@@ -438,7 +438,8 @@
 
 showFrame:aBoolean
     "turn on/off showing of the frame -
-     without a frame, only the label is shown at its position"
+     without a frame, only the label is shown at its position.
+     (unless the label is nil or #hidden)"
 
     aBoolean ~~ showFrame ifTrue:[
         showFrame := aBoolean.
@@ -568,7 +569,7 @@
 
     self clear.
 
-    label isNil ifTrue:[
+    (label isNil or:[ labelPosition == #hidden]) ifTrue:[
         labelLen := 0
     ] ifFalse:[
         label isString ifTrue:[
@@ -708,10 +709,10 @@
     sep := font heightOn:device.
     m2 := sep + sep.
 
-    showFrame ifFalse:[
+    true "showFrame" ifFalse:[
         ^ super preferredExtent + (0 @ m2)
     ].
-    ^ super preferredExtent+(m2 @ m2)
+    ^ super preferredExtent + (m2 @ m2)
 
     "Modified: 3.1.1997 / 22:02:56 / cg"
 !
@@ -735,7 +736,7 @@
     imH := innerHorizontalSpace * 2.
     imV := innerVerticalSpace * 2.
 
-    showFrame ifFalse:[
+    true "showFrame" ifFalse:[
         sepH := mH := lw := 0.
     ] ifTrue:[
         lw := 2.
@@ -760,5 +761,5 @@
 !FramedBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/FramedBox.st,v 1.47 2004-03-23 11:05:04 james Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/FramedBox.st,v 1.48 2008-07-18 09:41:59 cg Exp $'
 ! !