On Sun, Feb 28, 2010 at 09:53, [email protected] <
[email protected]> wrote:

> I need a list  and i dont want  that  i  can select the elemens  via
> mouse clicks. i try this
>
>            getChatlist : function(){
>                this.chatList = new qx.ui.form.List;
>                this.chatList.setScrollbarX("off");
>                this.chatList.set({selectionMode : "single"});
>                  this.chatList.setSelectable(false);
>                this.getChatlistStartData();
>                return this.chatList;
>                },
>
>
> but i can always select entrys. How can i  turn off this ?
>

That appears to not be possible with simple property settings. Maybe there
should be a selectionMode:"none" but there isn't.

The code I reviewed to find a possible answer were qx.ui.form.List, which
includes qx.ui.core.MMultiSelectionHandling which creates a selection
manager based on this.SELECTION_MANAGER. Since MMultiSelectionHandling is a
mixin, 'this' refers to the object of the class that included the mixin,
which was List. List does, in fact, define SELECTION_MANAGER to be
qx.ui.core.selection.ScrollArea. The ScrollArea manager has an _isSelectable
method that could be overridden.

So one way to accomplish what you're after seems to be to extend
qx.ui.core.selection.ScrollArea to, for example,
custom.MySelectionScrollArea and override the _isSelectable method. It
doesn't appear that instantiating a list does anything with a selection
manager, so you can probably simply instantiate your list: var list = new
qx.ui.form.List(); and then set the selection manager to be your selection
subclass: list.SELECTION_MANAGER = custom.MySelectionScrollArea;

I never tried this, but hopefully it'll work for you, or put you on a path
towards something that works.

You might post an enhancement bug to bugzilla requesting a
selectionMode:"none". Then again, there may be an easier way to do what
you're looking for that I didn't come across in my research. If so, someone
will point it out.

Derrell
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to