--- a/ScrollBar.st Mon Sep 13 17:04:24 2004 +0200
+++ b/ScrollBar.st Mon Sep 13 17:10:47 2004 +0200
@@ -124,7 +124,7 @@
"set position of (top of) thumb in percent"
thumb thumbOrigin:newOrigin.
- self enableDisableButtons
+ self enableDisableButtons.
!
thumbOrigin:newOrigin thumbHeight:newHeight
@@ -995,6 +995,18 @@
e2 ifTrue:[button2 enable] ifFalse:[button2 disable].
"Modified: / 29.4.1999 / 08:44:03 / cg"
+!
+
+updateNativeWidget
+ self isNativeWidget ifTrue:[
+ "/ self halt.
+ drawableId notNil ifTrue:[
+ device
+ setScrollPosition:thumb thumbOrigin rounded
+ redraw:true
+ in:drawableId.
+ ]
+ ].
! !
!ScrollBar methodsFor:'private-scrollview interface'!
@@ -1004,11 +1016,9 @@
(i.e. adjust thumbs origin & size for views size & views contents).
This is forwarded to the scroller here."
+ thumb setThumbFor:aView.
self isNativeWidget ifTrue:[
- "/ self halt.
- thumb setThumbFor:aView.
- ] ifFalse:[
- thumb setThumbFor:aView.
+ self updateNativeWidget.
].
self enableDisableButtons
!
@@ -1017,11 +1027,9 @@
"adjust thumbs height for aViews size & contents.
This is forwarded to the scroller here."
+ thumb setThumbHeightFor:aView.
self isNativeWidget ifTrue:[
- "/ self halt.
- thumb setThumbHeightFor:aView.
- ] ifFalse:[
- thumb setThumbHeightFor:aView.
+ self updateNativeWidget.
].
self enableDisableButtons
!
@@ -1030,11 +1038,9 @@
"adjust thumbs origin for aViews size & contents.
This is forwarded to the scroller here."
+ thumb setThumbOriginFor:aView.
self isNativeWidget ifTrue:[
- "/ self halt.
- thumb setThumbOriginFor:aView.
- ] ifFalse:[
- thumb setThumbOriginFor:aView.
+ self updateNativeWidget.
].
self enableDisableButtons
! !
@@ -1138,5 +1144,5 @@
!ScrollBar class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ScrollBar.st,v 1.73 2004-09-13 15:04:08 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ScrollBar.st,v 1.74 2004-09-13 15:10:47 ca Exp $'
! !