usability of listBox

Hi all,

I have some trouble with the usability of the $form->listBox currently I can’t understand if somebody is using it

  • How to get rid of the useless vertical scrollbar, in case the size of the listBox ist big enough? The HTML way of CSS with “‘style’ => ‘overflow: hidden’,” don’t to the job. Also increasing the table to be bigger as the content “‘size’ => count($thePostings)+1,” don’t work

  • Is there a way to easier select multiple items by mouse? After a lot of playing around I found that ctrl-alt-click is the only way selecting several independent elements. I can’t explain this to my users, why not simply click on more than one…

Or is there another way of giving access to a MANY_MANY relation. I’ve already tried the dropDownList but this is limited to one element by default. Adding the multiple attribute will change the behavior to be the same as a listBox.

Another option would be the checkBoxList, but this consumes so much space and looks very "old fashioned" - any other ideas?

Thanks

Achim

Hi Achim,

Actually, your issue is more of HTML/javascript-related than Yii. I also can’t understand why you can’t explain the use of CTRL+CLICK (use of ALT is not really necessary) to your users, but anyway…

These are Yii extensionsthat you can use:

Multiselect

EMultiselect

Hi macinville,

You are right, same problems in JQuery.

On my Mac the multiselect only works with ALT+CTRL on Firefox, maybe it’s a Mac behavior and works smother on Windows.

Wow, this are good hints, thanks for that. Both are much more ergonomically and nicer, I will definitive use one of them.

Thanks a lot

Achim

Or you could use (active)checkBoxList and, if necessary, css for scrollbars (overflow…)

I change the height using SELECT size property on this way. This works fine.

<?php echo $form->listBox($model,‘ID’, $mydata, array(‘size’=>26)); ?>