Jean-Yves F. Barbier wrote:
> Hi list,
>
> Is there a possibility to make a multiple selection in a treeview
> by program, not by mouse.
>
> I've got 2 treeviews: 1st is a group list, 2nd is users (only some users are
> part of a specific group)
> What I'd like is to select all users belonging to a group I "mouse-select"
> to visually show the connection.
>
> and if there's a manner to change the users selected colors, I'm in too.
>
> JY
>   
say you have a treeview called Larch. The following stub (untested)
should select all treeview items that begin with "A" and deselect all others

if not Larch.MoveFirst then
    repeat
       if Left$(Larch.Item.Text) = "A" then
            Larch.Item.Selected = TRUE
            else
             Larch.Item.Selected = FALSE
       endif
    until Larch.MoveNext
endif

Regards
Werner


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to