[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    Re: [Gambas-user] Fwd: Need help on treeview
From:       Fabien Bodard <gambas.fr () gmail ! com>
Date:       2009-04-28 22:36:21
Message-ID: 6324a42a0904281536l2837b26dq98e5a3cd2f07b822 () mail ! gmail ! com
[Download RAW message or body]

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@club-internet.fr>:
> 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@gmail.com>
>> > > Date : 28 avril 2009 23:12:33 HAEC
>> > > À : gambas-user@lists.sourceforge.net
>> > > Objet : [Gambas-user] Need help on treeview
>> > > Répondre à : mailing list for gambas users
>> > > <gambas-user@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@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@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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic