[ENH]ScrollPane (scrollBarHidden: true)

Karl Ramberg karl.ramberg at chello.se
Sun May 21 19:17:49 UTC 2000


[ENH]ScrollPane (scrollBarHidden: true)

Makes it possible to hide the scrollbar in scrollpanes (!!).
Sometimes when the pane is really small the scrollbar makes no sence
anyway.
It has a minimum height of 42 pixels and is really not useful when it's
that small.

This changeset utilizes a instance variable that is defined but
currently not used  (?)  in the ScrollPane.

Karl

-------------- next part --------------
'From Squeak2.8alpha of 19 February 2000 [latest update: #2158] on 21 May 2000 at 8:50:54 pm'!

!ScrollPane methodsFor: 'retractable scroll bar' stamp: 'kfr 5/21/2000 20:11'!
mouseEnter: event
	(owner isKindOf: SystemWindow) ifTrue:
		[owner paneTransition: event].
	(retractableScrollBar and: [(submorphs includes: scrollBar) not])
		ifTrue: [
				(scrollBarHidden ~~ true)
					ifTrue:[
				self privateAddMorph: scrollBar atIndex: 1.
				self resizeScrollBar.
				scrollBar changed]]! !

!ScrollPane methodsFor: 'menu' stamp: 'kfr 5/21/2000 20:38'!
scrollBarHidden: aBoolean
	"Hides the scrollBar when set to true. retractableScrollBar is set to true to
utilize the whole pane."
	scrollBarHidden _ aBoolean.
	scrollBarHidden
		ifTrue: [retractableScrollBar _ true.
				self privateRemoveMorph: scrollBar].
	self extent: self extent
	
! !



More information about the Squeak-dev mailing list