HVScrollableView.st
changeset 678 c1967a46b2c1
parent 584 e3b11115fc18
child 713 0c38ad51016d
--- a/HVScrollableView.st	Fri May 24 18:35:29 1996 +0200
+++ b/HVScrollableView.st	Fri May 24 20:13:23 1996 +0200
@@ -45,7 +45,7 @@
 "
 ! !
 
-!HVScrollableView methodsFor:'accessing'!
+!HVScrollableView methodsFor:'accessing - components'!
 
 horizontalScrollBar
     "return the horizontal scrollbar"
@@ -281,10 +281,28 @@
     ^ super preferredExtent.
 
     "Modified: 23.4.1996 / 00:15:25 / cg"
+!
+
+preferredExtentForLines:numLines cols:numCols
+    "return my preferredExtent for given number of lines and cols."
+
+    |pref m2|
+
+    scrolledView notNil ifTrue:[ 
+        m2 := innerMargin * 2.
+        pref := scrolledView preferredExtentForLines:numLines cols:numCols.
+        ^ (pref x + scrollBar width + m2) 
+          @ 
+          (pref y + hScrollBar height + m2).
+    ].
+    ^ super preferredExtent.
+
+    "Modified: 23.4.1996 / 00:15:25 / cg"
+    "Created: 24.5.1996 / 17:15:43 / cg"
 ! !
 
 !HVScrollableView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/HVScrollableView.st,v 1.16 1996-04-25 17:16:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/HVScrollableView.st,v 1.17 1996-05-24 18:12:39 cg Exp $'
 ! !