VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.
Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig
by gkipe » Wed Apr 14, 2010 2:55 pm
Is there an easy way to open all tree nodes? What action? I want to build my tree and walk the tree and expand every node when my window opens?
Thanks,Garet
- Attachments
-
- Tree Nodes
- TreeNodes.jpg (70.9 KiB) Viewed 178 times
-
gkipe
-
- Posts: 24
- Joined: Tue Feb 03, 2009 11:05 am
-
by nmongeau » Thu Apr 15, 2010 5:47 am
You need to send #expandItem: to the tree for each node.
Something like (for 1st level items only in this case)
myTree items do:
[:each |
myTree expandItem: each].
Normand
-
nmongeau
- [|]
-
- Posts: 29
- Joined: Fri Jan 12, 2007 9:37 am
by gkipe » Thu Apr 15, 2010 7:06 am
Yes I did that, but got a screen painting walkback when I would expand an item that was on the bottom of screen ( not visible ). So I tried to scroll down the container while I expanded, havent gotten that to work. I was thinking there was a slick property/action I can set or use, or someone has done this in the past.
-
gkipe
-
- Posts: 24
- Joined: Tue Feb 03, 2009 11:05 am
-
by nmongeau » Thu Apr 15, 2010 7:17 am
Hmm yes that rings a bell. We do have lots of code in that area, and it seems that we prevent the tree from drawing while we expand.
Try something like this (with a breach of encapsulation):
myTree primaryWidget deferRedraw:
{ myTree items do:
[:each |
myTree expandItem: each]].
Normand
-
nmongeau
- [|]
-
- Posts: 29
- Joined: Fri Jan 12, 2007 9:37 am
by Michael Keppler » Wed May 26, 2010 12:39 am
I'm not sure, what widget that is (I'm no UI developer), but at least EwTableTree has an expandAll method, which does all that (and even sets the waiting cursor). And in our image, EwIconTree uses the same implementation of expandAll.
-
Michael Keppler
-
- Posts: 28
- Joined: Wed Feb 27, 2008 4:33 am
Return to VA Smalltalk 7.0, 7.5 & 8.0
Who is online
Users browsing this forum: No registered users and 1 guest