[Gambas-user] Fwd: Need help on treeview

Fabien Bodard gambas.fr at ...626...
Wed Apr 29 00:36:21 CEST 2009


hi olivier

Thank you for you help and this is the correct code now :

Public Sub WalkOnTree()

TreeView1.MoveFirst()

  While TreeView1.Available

    ' *******Do what you want here*****

    Print TreeView1.Item.Key


    '************************************

    If TreeView1.MoveChild() Then
      'PRINT "No child"
     TreeView1.MoveBack
      If TreeView1.MoveNext() Then
        'PRINT "  No Next"
        TreeView1.MoveBack
        If Not TreeView1.MoveParent() Then
          TreeView1.MoveNext()
        End If
      End If
    End If
  Wend
 End


no need to save the previous key ;-)

Regards,

Fabien Bodard



2009/4/29 linus <linuxos at ...1896...>:
> Hi,
>
> This my code. I hope that you search for your project:
>
>
>
> Public sub Compte_Item()
>
>  DIM KEYSAV as Integer
>
>  ColumnView1.MoveFirst()
>  WHILE ColumnView1.Available
>
>    KEYSAV = ColumnView1.Item.Key
>
>    ' Do what you want here
>
>    IF ColumnView1.MoveChild() THEN
>      'PRINT "No child"
>      ColumnView1.MoveTo(KEYSAV2)
>      IF ColumnView1.MoveNext() THEN
>        'PRINT "  No Next"
>        ColumnView1.MoveTo(KEYSAV2)
>        IF NOT ColumnView1.MoveParent() THEN
>         ColumnView1.MoveNext()
>        END IF
>      END IF
>    END IF
>  WEND
>
> Olivier
>
>
>> > > De : Fabien Bodard <gambas.fr at ...626...>
>> > > Date : 28 avril 2009 23:12:33 HAEC
>> > > À : gambas-user at lists.sourceforge.net
>> > > Objet : [Gambas-user] Need help on treeview
>> > > Répondre à : mailing list for gambas users
>> > > <gambas-user at lists.sourceforge.net>
>> > >
>> > >
>> > > Private Sub Filter()
>> > >
>> > >  Dim s As String
>> > >
>> > >    With $hTreeView
>> > >    .MoveFirst
>> > >    While .Available
>> > >      $hFltCV.Add(.item.Key, .item.Text, .Item.Picture)
>> > >      Print .Key
>> > >        If Not .MoveChild Then
>> > >          Print .Item.Count
>> > >          Filter()
>> > >          .MoveParent
>> > >        Endif
>> > >      .MoveNext
>> > >    Wend
>> > >
>> > >    Print "sortie"
>> > >
>> > >  End With
>> > >
>> > > End
>> > >
>> > > this is a code that intend to copy a treeview on another one :/
>> > >
>> > > but I've missed the curses on treeview, someone have more affinity
>> > > on this ?
>> > >
>> > >
>> > > My code just detect the first entry and don't purchase on
>> > > childs....
>> > >
>> > > PLEEAASE HEEELP !
>> > >
>> > > Regards
>> > > Fabien Bodard
>> > >
>> > > ------------------------------------------------------------------------------
>> > > Register Now & Save for Velocity, the Web Performance &
>> > > Operations
>> > > Conference from O'Reilly Media. Velocity features a full day of
>> > > expert-led, hands-on workshops and two days of sessions from
>> > > industry
>> > > leaders in dedicated Performance & Operations tracks. Use code
>> > > vel09scf
>> > > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>> > > _______________________________________________
>> > > Gambas-user mailing list
>> > > Gambas-user at lists.sourceforge.net
>> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> 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