Skip to content

Instantly share code, notes, and snippets.

@girba
Created February 28, 2012 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save girba/1930477 to your computer and use it in GitHub Desktop.
Save girba/1930477 to your computer and use it in GitHub Desktop.
Morphic example: Expandable text morphs
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