PDA

View Full Version : Multiple line select box



tkmilbaugh
22 Apr 2009, 4:57 AM
I have not found any way to construct a multiple line scrolling box that works like an HTML SELECT with size > 0, like this code:

<select size="5">
<option value="foo">foo</option>
<option value="bar">bar</option>
<option value="blech">blech</option>
</select>

Resulting in this: http://farm4.static.flickr.com/3576/3464850847_5d802307c9_t.jpg

A grid does not work, because I don't want any headers or gridlines or resizing, etc.
http://www.flickr.com/photos/[email protected]/3464850847/

22 Apr 2009, 6:11 AM
use DataView

mjlecomte
22 Apr 2009, 6:14 AM
ComboBox?

22 Apr 2009, 6:17 AM
Negative, it's not what he wants.

To be honest, I don't see why there is not multi-select form field in the framework.

mjlecomte
22 Apr 2009, 6:28 AM
Yeah, noticed that after reread that I misread the post. I was looking at ComboBox to see if it could be extended to offer singleSelect:false and instead of trigger to open, I guess just render it open.

22 Apr 2009, 6:31 AM
well, then you have the filter box up top, which is not required for a multi-select box. :)

hence, we're back to the data view (used in the combo of course), with some field validations added. ;)

tkmilbaugh
22 Apr 2009, 9:10 AM
Thanks for your suggestions, I have a data view, but am having trouble making it look like I want it:

http://farm4.static.flickr.com/3634/3466224192_14b7aa501f_m.jpg

How would I force a scroll bar to always appear, and disable the cursor appearing inside a selected item?

22 Apr 2009, 9:58 AM
You need to set the element to scroll: auto in the CSS.


Also, you'll need to do things like setup validation and invalid marker methods.


ideally, this should extend 'field'