ScrollPane
Last updated at 10:57 pm UTC on 20 December 2019
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
https://www.youtube.com/watch?v=PC1PKA9B6lw Video unavailable
This video is no longer available because the YouTube account associated with this video has been terminated.