Web Tree Control
Gavin Foster
omnislist at dataweaver.com
Wed Jan 13 14:28:27 EST 2010
Hi all,
For the benefit of the list, below is the solution to the web tree
control. I assumed the controls properties would take care of things
but it requires 5 columns for its own internal workings.
Help was provided by Kelly and Nicky of Tiger Logic.
Thanks guys!
A)
The $datamode property defaults to kTreeDataFlatList, so you must add
a necessary trailing five columns to your list ($iconid $ident
$enterable $isexpanded $textcolor). What was happening before was I
gave it a three column list in $dataname, and it went to the last
column for $textcolor, the first was used for $enterable, and there
were no columns left to use for displayed data. You've gotta have at
least 8 columns for a 3-deep tree.
B)
The webtree doesn't support multiple columns so you may need to think
of an alternative interface for showing the additional data.
With regards to the tree data itself, what format are you building the
tree list as ?
The webtree does support $dataname, but the structure of the tree list
columns needed to corrospond to the $datamode of the tree.
For example, the default tree datamode is kTreeDataFlatList and the
structure looks like this :
Do iList.$define(root,child,iconid,ident,enterable,showexpand,textcolor)
Do iList.$add("root","",0,1,0,0,0)
Do iList.$add("root","child1",0,2,0,0,0)
Do iList.$add("root","child2",0,3,0,0,0)
For more info on this structure see the manual or this technote :
http://www.omnis.net/technotes/index.html?detail=tngi0003
The technote I noticed had a couple of mistakes so better check the
programming manual for tree lists.
There are various datamode on the webtree. FlatListTags is the same as
above, but an extra column at the end ( tag ) used for whatever you
want. The other XML datamodes were for an internal development and I'm
not sure got documented.
Also, if you don't switch on the multipage of icons ( containing the
tree expand box ) on the remote form no icons will be sent to the
client and it may look like your tree root node doesn't have any
children. Clicking on the node will still expand/collapse the root.
If you set $iconpages of the remote form and send down the multipage
icons all will be ok.
More information about the omnisdev-en
mailing list