Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
ScrollPane
Last updated at 7:25 pm UTC on 18 June 2018
Squeak 3.6
 ComponentLikeModel subclass: #ScrollPane
	instanceVariableNames: 'scrollBar scroller retractableScrollBar scrollBarOnLeft getMenuSelector getMenuTitleSelector scrollBarHidden hasFocus '
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Morphic-Windows'


Squeak 5.2
 MorphicModel subclass: #ScrollPane
	instanceVariableNames: 'scrollBar scroller retractableScrollBar scrollBarOnLeft getMenuSelector getMenuTitleSelector hasFocus hScrollBar hScrollBarPolicy vScrollBarPolicy scrollBarThickness'
	classVariableNames: 'UseRetractableScrollBars'
	poolDictionaries: ''
	category: 'Morphic-Windows'


 example2
 	| window scrollPane pasteUpMorph point textMorph |
 	window := SystemWindow new.
 	scrollPane := ScrollPane new.
 	pasteUpMorph := PasteUpMorph new.
 	pasteUpMorph extent: 1000@1000.
 	scrollPane scroller addMorph: pasteUpMorph.
 	window addMorph: scrollPane frame: (0@0 corner: 1@1).
 	0 to: 1000 by: 100 do: 
 		[:x | 0 to: 1000 by: 100 do:
 			[:y |
 				point :=  x@y.
 				textMorph := TextMorph new contents: point asString.
 				textMorph position: point.
 				pasteUpMorph addMorph: textMorph
 			]
 		].
 	window openInWorld.


See
Views on a map
Recipe: Create a window with scrollable contents