You are right. Sorry :(

On 3/10/06, Priebe, Jason <[EMAIL PROTECTED]> wrote:
> On 3/10/06, zoid <[EMAIL PROTECTED]> wrote:
> > I am having a problem in setting an item in a ListView to
> the selected
> > state.
> > Can anyone help ?

Ricardo Borillo wrote:
> You can use:
>
> lv.getPane().getManager().addEventListener("changeSelection",
> function(e) {
>    ...
> });

I don't think that is what zoid is asking.  I think he wants to
set the selection via code.  The QxSelectionManager is the key;
see the docs here:

http://qooxdoo.oss.schlund.de/public/docs/classes/class_QxSelectionManag
er.html

Have a look at setSelectedItems() and setItemSelected().  I've been
using QX for a couple of months now, and I felt silly when Sebastian
had to tell me to use the manager on a Gallery just the other day.
This is one of the least intuitive parts of the API, but once you
get the hang of it, it is not too bad.

One trick: the setSelectedItems() functions want item objects;
they don't take numeric indices.  Suppose you want to select
items 3 and 5 in the list.  You want to use getItems() to get
the items from the list, then from that array, you can get item
3 and item 5 and call setSelectedItems() with them (or just
call setItemSelected() on each item.

Jason Priebe
CBC New Media


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



--
Salut,
====================================
Ricardo Borillo Domenech
Analista/Programador - Servei d'Informàtica
Universitat Jaume I
http://xml-utils.com

Reply via email to