no additional scrollBar, if embedded view is itself a scrollable
authorClaus Gittinger <cg@exept.de>
Sun, 13 Feb 2000 14:00:07 +0100
changeset 1351 811686e8acab
parent 1350 4e6bdf86b9ac
child 1352 73f656cea457
no additional scrollBar, if embedded view is itself a scrollable one (for subChannels list(
UISpecificationTool.st
--- a/UISpecificationTool.st	Sat Feb 12 16:36:24 2000 +0100
+++ b/UISpecificationTool.st	Sun Feb 13 14:00:07 2000 +0100
@@ -922,7 +922,7 @@
 
 scrolledView:aView
     "set the view to be scrolled"
-    |scr|
+    |scr theOneComponent y|
 
     scrolledView == aView ifTrue:[^ self].
 
@@ -936,7 +936,18 @@
         scrolledView borderWidth:0; level:0.
 
         outerFrame addSubView:scrolledView.
-        scrolledView origin:0@0 corner:1.0 @ (scrolledView preferredExtent y).
+        scrolledView subViews size == 1 ifTrue:[
+            theOneComponent := scrolledView subViews first.
+            theOneComponent isScrollWrapper ifTrue:[
+                "/ give it a full-relative size, and let it do
+                "/ the scrolling itself.
+                y := 1.0
+            ]
+        ].
+        y isNil ifTrue:[
+            y := scrolledView preferredExtent y
+        ].
+        scrolledView origin:0@0 corner:1.0 @ y.
         scrolledView := scrolledView.
         scrolledView allViewBackground:(self viewBackground).
     ].