Created
February 28, 2012 08:01
-
-
Save girba/1930477 to your computer and use it in GitHub Desktop.
Morphic example: Expandable text morphs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scrollpane := GeneralScrollPane new. | |
scrollpane changeScrollerTableLayout. | |
pane := PanelMorph new | |
fillStyle: Color transparent; | |
hResizing: #spaceFill; | |
vResizing: #shrinkWrap; | |
changeTableLayout; | |
layoutInset: 2; | |
cellInset: 2; | |
yourself. | |
scrollpane scrollTarget: pane. | |
Collection selectors do: [:each | | |
textMorph := TextMorph new | |
contentsWrapped: (Collection sourceCodeAt: each); | |
hResizing: #spaceFill; | |
vResizing: #shrinkWrap; | |
borderWidth: 1. | |
pane addMorph: textMorph ]. | |
scrollpane openInWindow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment