From 404bb4e35235f30895bba791c10c4192cadaac34 Mon Sep 17 00:00:00 2001 From: Esteban Lorenzano Date: Wed, 27 Nov 2024 15:47:31 +0100 Subject: [PATCH] add example easy resizable columns --- .../SpEasyColumnViewPresenter.class.st | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Spec2-ListView/SpEasyColumnViewPresenter.class.st b/src/Spec2-ListView/SpEasyColumnViewPresenter.class.st index d579e8c4..6e42b49f 100644 --- a/src/Spec2-ListView/SpEasyColumnViewPresenter.class.st +++ b/src/Spec2-ListView/SpEasyColumnViewPresenter.class.st @@ -44,6 +44,25 @@ SpEasyColumnViewPresenter class >> exampleActivateOnDoubleClick [ open ] +{ #category : 'examples' } +SpEasyColumnViewPresenter class >> exampleResizableColumns [ + "This example show the simples list view you can make: A list with a label" + + self new + application: SpApplication new; + items: self environment allClasses; + beResizable; + addColumn: (SpStringTableColumn new + title: 'Class'; + evaluated: [ :each | each name ]; + yourself); + addColumn: (SpStringTableColumn new + title: 'Lines of code'; + evaluated: [ :each | each linesOfCode ]; + yourself); + open +] + { #category : 'examples' } SpEasyColumnViewPresenter class >> exampleWithColumnWidth [ "This example show the simples list view you can make: A list with a label"