Skip to content

Instantly share code, notes, and snippets.

@cmoore
Last active August 15, 2017 21:48
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 cmoore/0e400557cab5f6928b2183e94919e98a to your computer and use it in GitHub Desktop.
Save cmoore/0e400557cab5f6928b2183e94919e98a to your computer and use it in GitHub Desktop.
GeneralScrollPane is not scolling.
lx := ZnClient new.
json_data := Array with:
(NeoJSONReader fromString: (lx get: 'https://api.github.com/users/cmoore')).
sheet := SpreadsheetGridMorph new
hResizing: #spaceFill;
vResizing: #spaceFill;
yourself.
json_data
withIndexCollect: [ :dict :yindex |
dict keys
withIndexCollect: [ :string :xindex |
sheet
cellStringAt: xindex @ yindex put: (dict at: string) asString;
cellSpacing: 31 + string size ] ].
scrollpane := GeneralScrollPane new.
pane := PanelMorph new
fillStyle: Color transparent;
hResizing: #spaceFill;
vResizing: #spaceFill;
changeTableLayout;
layoutInset: 2;
cellInset: 2;
yourself.
scrollpane scrollTarget: pane.
pane addMorph: sheet.
scrollpane scrollTarget: pane.
scrollpane changeScrollerTableLayout.
scrollpane openInWindow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment