--- a/HierarchicalListView.st Sat May 02 19:50:29 2020 +0200
+++ b/HierarchicalListView.st Sat May 02 19:51:31 2020 +0200
@@ -104,6 +104,33 @@
"
!
+example2
+"
+ |top sel list item|
+
+ list := HierarchicalList new.
+ item := HierarchicalItem::Example label:'Root Item'.
+
+ item expand.
+ list showRoot:false.
+ list root:item.
+
+ top := StandardSystemView extent:300@300.
+ sel := ScrollableView for:HierarchicalListView miniScrollerH:true
+ origin:0.0@0.0 corner:1.0@1.0 in:top.
+
+ sel useDefaultIcons:false.
+ sel list:list.
+ sel multipleSelectOk:true.
+ sel showLines:false.
+
+ sel doubleClickAction:[:i| (list at:i) toggleExpand ].
+ sel indicatorAction:[:i| (list at:i) toggleExpand ].
+
+ top open.
+"
+!
+
examples
"
show a hierarchical list
@@ -203,31 +230,6 @@
"
-!
-
-test
- |top sel list item|
-
- list := HierarchicalList new.
- item := HierarchicalItem::Example labeled:'Root Item'.
-
- item expand.
- list showRoot:false.
- list root:item.
-
- top := StandardSystemView extent:300@300.
- sel := ScrollableView for:HierarchicalListView miniScrollerH:true
- origin:0.0@0.0 corner:1.0@1.0 in:top.
-
- sel useDefaultIcons:false.
- sel list:list.
- sel multipleSelectOk:true.
- sel showLines:false.
-
- sel doubleClickAction:[:i| (list at:i) toggleExpand ].
- sel indicatorAction:[:i| (list at:i) toggleExpand ].
-
- top open.
! !
!HierarchicalListView class methodsFor:'resources'!