[Gambas-user] Columnview "collapse" function
Gianluigi
bagonergi at ...626...
Thu Nov 10 13:59:11 CET 2016
I probably did not understand the problem, but:
This discussion could help? [0]
or perhaps starting with:
tvwDoc.MoveFirst
hNode = $hDoc.Index[tvwDoc.Key]
iLevel = hNode.Level
Regards
Gianluigi
[0]
http://gambas.8142.n7.nabble.com/Accessing-the-Treeview-Collection-td20313.html#a20317
2016-11-10 13:27 GMT+01:00 Fabien Bodard <gambas.fr at ...626...>:
> well have you a small functional things ?.... certainly something
> stupid but i can't see it without touching
>
> 2016-11-10 4:38 GMT+01:00 adamnt42 at ...626... <adamnt42 at ...626...>:
> > What in the name of American erections am I doing wrong here?
> >
> > Public Sub mnuCollapse_Click()
> >
> > ' Collapse all nodes to the level of the selected node
> > Dim hNode As CNode
> > Dim hAttr As String
> > Dim iLevel As Integer
> >
> > hNode = $hDoc.Index[tvwDoc.Key]
> > iLevel = hNode.Level
> >
> > START_HERE:
> > tvwDoc.MoveFirst
> > While tvwDoc.MoveNext()
> > hNode = $hDoc.Index[tvwDoc.Item.Key] '<-- All "seems" to fall apart
> here?
> > If hNode.Level >= iLevel Then
> > tvwDoc.Item.Expanded = False
> > Endif
> > Wend
> >
> > End
> >
> > tvwDoc is a ColumnView. There is a selected item in the _TreeView, Thus,
> tvwDoc.Key provides a key into the $hDoc.Index collection from which I can
> determine the object that was used to populate that columnView branch and
> from that objects values I can see the "Level" that I want. All that works
> fine.
> >
> > What I am trying to do is go through the ColumnView branches and
> "collapse" any branch of the same "Level". Which gets us to START_HERE.
> >
> > There must be something absolutely, stupidly, simple that I am trying to
> do wrong here - :-(
> >
> > Any help.
> >
> >
> > rgrds
> > b
> >
> >
> > --
> > B Bruen <adamnt42 at ...3379... (sort of)>
> >
> > ------------------------------------------------------------
> ------------------
> > Developer Access Program for Intel Xeon Phi Processors
> > Access to Intel Xeon Phi processor-based developer platforms.
> > With one year of Intel Parallel Studio XE.
> > Training and support from Colfax.
> > Order your platform today. http://sdm.link/xeonphi
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
> --
> Fabien Bodard
>
> ------------------------------------------------------------
> ------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list