[Gambas-user] columnview count how many are selected

Joshua Higgins joshiggins at ...1601...
Mon Feb 9 19:57:59 CET 2009


That didn't work I'm afraid. :(

Trying exactly as you wrote ended up with the error "unknown symbol
"Selected" in class "ColumnView". I changed it to this:

nbc as integer = 0

public sub numberCount()
 Columnview1.movefirst()
 repeat
   if columnview1.current.selected then inc nbc
 until columnview1.movenext()
end

but that just makes the program hang when I call numberCount(). I'm
surprised there isn't a built in function for this, or have I just not heard
of it?

Thanks.

2009/2/9 Jack <jscops at ...11...>

> Le lundi 09 février 2009 19:09:40 Joshua Higgins, vous avez écrit :
> > Hello,
> >
> > I'm using a columnview with the property Mode set to Multiple. What code
> do
> > I need to let me count how many are currently selected. I tried
> >
> > ColumnView1.Current.Count but that always prints 0.
>
> try this Joshua
>
> nbc as integer = 0 'number count
>
> public sub numberCount()
>  Columnview1.movefirst()
>  repeat
>    if columnview1.selected then inc nbc
>  until columnview1.movenext()
> end
>
> Regards.
>
> Jacky
>
>
>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK
> and
> Ajax docs to start building applications today-
> http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
joshua higgins
>>>>>>------



More information about the User mailing list