fixed textBox resizing
authorClaus Gittinger <cg@exept.de>
Fri, 18 Aug 2000 21:38:48 +0200
changeset 2220 95684c468ffd
parent 2219 9ffca3757666
child 2221 9510bfb6912c
fixed textBox resizing
DialogBox.st
--- a/DialogBox.st	Fri Aug 18 13:18:42 2000 +0200
+++ b/DialogBox.st	Fri Aug 18 21:38:48 2000 +0200
@@ -2883,13 +2883,14 @@
     dialog addAbortAndOkButtons.
     dialog okButton isReturnButton:false.
     dialog makeTabable:textView.
+    dialog stickAtBottomWithVariableHeight:textView.
     dialog open.
     dialog accepted ifTrue:[
         ^ textView contents
     ].
     ^ nil
 
-
+    "Modified: / 18.8.2000 / 21:31:49 / cg"
 ! !
 
 !DialogBox class methodsFor:'multiple choice dialogs'!
@@ -5177,7 +5178,8 @@
     "arrange for a component to be positioned at a constant offset
      from the bottom of the box and its height to remain the same.
      This will keep the component at a constant distance from the bottom
-     (without this setup, it would stay at a constant offset from the top)"
+     (without this setup, it would stay at a constant offset from the top).
+     ATTENTION: use this as a last step, after all components have been added."
 
     self stickAtBottomWithFixHeight:aComponent left:0.0 right:1.0
 
@@ -5204,15 +5206,16 @@
         box show
    "
 
-    "Created: 27.1.1996 / 17:17:41 / cg"
-    "Modified: 27.1.1996 / 18:29:03 / cg"
+    "Created: / 27.1.1996 / 17:17:41 / cg"
+    "Modified: / 18.8.2000 / 21:38:21 / cg"
 !
 
 stickAtBottomWithFixHeight:aComponent left:left right:right
     "arrange for a component to be positioned at a constant offset
      from the bottom of the box and its height to remain the same.
      This will keep the component at a constant distance from the bottom
-     (without this setup, it would stay at a constant offset from the top)"
+     (without this setup, it would stay at a constant offset from the top).
+     ATTENTION: use this as a last step, after all components have been added."
 
     self resize.
 
@@ -5244,8 +5247,8 @@
         box show
    "
 
-    "Created: 27.1.1996 / 17:17:41 / cg"
-    "Modified: 27.1.1996 / 18:29:03 / cg"
+    "Created: / 27.1.1996 / 17:17:41 / cg"
+    "Modified: / 18.8.2000 / 21:38:26 / cg"
 !
 
 stickAtBottomWithVariableHeight:aComponent
@@ -5253,38 +5256,39 @@
      from the bottom of the box and its height to be adjusted.
      This will resize the component for a constant distance from the top,
      and the bottom.
-     (without this setup, its height would remain constant)"
+     (without this setup, its height would remain constant).
+     ATTENTION: use this as a last step, after all components have been added."
 
     self resize.
 
     aComponent
-	bottomInset:(self height - aComponent bottom); 
-	corner:1.0@1.0.
+        bottomInset:(self height - aComponent bottom); 
+        corner:1.0@1.0.
 
     "
      compare the resizing behavior of:
 
-	|box|
-
-	box := Dialog new.
-	box addTextLabel:'hello'.
-	(box addComponent:(SelectionInListView new)) level:-1.
-	box addOkButton.
-	box show
+        |box|
+
+        box := Dialog new.
+        box addTextLabel:'hello'.
+        (box addComponent:(SelectionInListView new)) level:-1.
+        box addOkButton.
+        box show
 
      with:
 
-	|box list|
-
-	box := Dialog new.
-	box addTextLabel:'hello'.
-	list := (box addComponent:(SelectionInListView new)) level:-1.
-	box addOkButton.
-	box stickAtBottomWithVariableHeight:list.
-	box show
+        |box list|
+
+        box := Dialog new.
+        box addTextLabel:'hello'.
+        list := (box addComponent:(SelectionInListView new)) level:-1.
+        box addOkButton.
+        box stickAtBottomWithVariableHeight:list.
+        box show
    "
 
-    "Modified: 27.4.1996 / 18:34:20 / cg"
+    "Modified: / 18.8.2000 / 21:38:35 / cg"
 !
 
 yPosition 
@@ -6471,6 +6475,6 @@
 !DialogBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.151 2000-08-17 22:52:45 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/DialogBox.st,v 1.152 2000-08-18 19:38:48 cg Exp $'
 ! !
 DialogBox initialize!