ScrollBar.st
changeset 3031 ffba662df900
parent 3030 801adbcb9e01
child 3032 0c188fd28ebd
--- a/ScrollBar.st	Tue Sep 14 18:05:47 2004 +0200
+++ b/ScrollBar.st	Tue Sep 14 18:10:46 2004 +0200
@@ -316,7 +316,7 @@
 
 beNativeWidget
     super beNativeWidget.
-    self destroyElements.
+    self makeElementsInvisible.
 !
 
 orientation
@@ -779,24 +779,6 @@
     "Created: 1.3.1996 / 19:22:11 / cg"
 !
 
-destroyElements
-    button1 notNil ifTrue:[
-        button1 beInvisible.
-        "/ button1 destroy.
-        "/ button1 := nil.
-    ].
-    button2 notNil ifTrue:[
-        button2 beInvisible.
-        "/ button2 destroy.
-        "/ button2 := nil.
-    ].
-    thumb notNil ifTrue:[
-        thumb beInvisible.
-        "/ thumb destroy.
-        "/ thumb := nil.
-    ].
-!
-
 initStyle
     "setup viewStyle specifics"
 
@@ -876,6 +858,23 @@
     "Modified: / 29.4.1999 / 08:43:30 / cg"
 !
 
+makeElementsInvisible
+    "when using native widget, my elements are not visible.
+     (they are not destroyed, to keep a place for their attributes,
+      and to allow future dynamic switching and snapshot restore on
+      a non-native system)"
+
+    button1 notNil ifTrue:[
+        button1 beInvisible.
+    ].
+    button2 notNil ifTrue:[
+        button2 beInvisible.
+    ].
+    thumb notNil ifTrue:[
+        thumb beInvisible.
+    ].
+!
+
 reinitialize
     super reinitialize.
     self setElementPositions.
@@ -1038,7 +1037,6 @@
                     ena := #DISABLE_BOTH.
                 ]
             ].
-ena infoPrintCR.
             device enableScrollBar:ena in:drawableId.
         ].
     ].
@@ -1169,5 +1167,5 @@
 !ScrollBar class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ScrollBar.st,v 1.78 2004-09-14 16:05:47 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ScrollBar.st,v 1.79 2004-09-14 16:10:46 ca Exp $'
 ! !