[Gambas-user] TreeView internal cursor

Timothy Marshal-Nichols timothy.marshal-nichols at ...247...
Tue Oct 17 16:59:21 CEST 2006


>
> 
> It already does - at least for the gb.qt TreeView. Though it might not
> be very well documented. Use MoveBelow() as in this example:
> 
>   ' Go to the first item
>   IF TreeView1.MoveFirst() THEN
>     REPEAT
>       ' Do what you need with the tree view item
> 
>     ' Next item in the TreeView
>     UNTIL TreeView1.MoveBelow()
>   END IF
> 
> This will visit every item in the TreeView. (Not sure if it works with
> Gambas 1.0.xx)
> 

Ugh! Let me correct that example:

  ' Go to the first item
  IF NOT TreeView1.MoveFirst() THEN
    REPEAT
      ' Do what you need with the tree view item
      PRINT TreeView1.Item.Text

    ' Next item in the TreeView
    UNTIL TreeView1.MoveBelow()
  END IF

Thanks

8-) Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>






More information about the User mailing list