[Gambas-user] Treeview HELL...

Benoit Minisini gambas at ...1...
Sun Mar 4 15:28:02 CET 2007


On dimanche 4 mars 2007, sbungay wrote:
>    Thank you Timothy.
>    The last attempt I made before heading off to sleep on it was as
> follows;
>
> WITH TreeViewQuest
>       .MoveFirst
>       REPEAT
>          message.info(.Item.Key & ", " & .Item.Text)
>          .MoveNext
>          message.info(.Item.Key & ", " & .Item.Text)
>       UNTIL TreeViewQuest.MoveBelow()
> END WITH
>
>    I was on the right track but being close doesn't count.
>    Now what we need is for the virtual TreeItem class to have a
> ParentKey property in it. 

You have the Item.Parent.Key.

I'm not sure that using MoveBelow() and MoveAbove() work in all cases (they 
are just a direct interface to the corresponding Qt methods). Maybe they do 
not return items that are not visible.

I think you must use MoveFirst(), MoveNext(), and MoveChild() in a recursive 
function to browse all the treeview nodes.

Regards,

-- 
Benoit Minisini




More information about the User mailing list