Can I scroll content in a multiSelectSet or modalGroup?

30 views
Skip to first unread message

Cheese

unread,
Feb 10, 2012, 2:14:18 PM2/10/12
to InterSystems: Zen Community
I apologize in advance if this is a naive question.

I've got a modalGroup that contains a multiSelectSet. The modalGroup
is displayed when the user clicks a button, but before
modalGroup.show() is called, the multiSelectSet is populated, at
runtime, with a bunch of names, the number of which isn't known until
the user clicks the button. What I'd like is for the multiSelectSet or
modalGroup to obey some maximum height, and apply scrollbars if the
content causes it to exceed that height. This would be similar in
behavior to what dropdownHeight does for dataCombo.

I'm using modalGroup instead of popping up a window because a) it's
modal, and b) it's easier (assuming I can get the scrolling behavior I
want). I can try to copy what the combobox does, but I'm hoping
there's something simple I can do instead of looking at the combobox
code, and trying to apply it to a modalGroup.

I'm using multiSelectSet so the user can select multiple names, but if
there's some other way to select multiple items from a listBox or
combobox, I'd probably be interested in hearing. I like what I'm
getting from modalGroup and multiSelectSet, though, so if I can get
the content to scroll I'd stick with that.

Thanks,
Cheese

Dale du Preez

unread,
Feb 10, 2012, 4:10:44 PM2/10/12
to intersys...@googlegroups.com
Hi Cheese,

Can you specify CSS attributes for the div(s) around your
multiSelectSet? You should be able to use a combination of the height
and overflow-y attributes to specify how the outer div behaves when its
children exceed those bounds.

Dale

Roberto

unread,
Feb 10, 2012, 5:01:28 PM2/10/12
to InterSystems: Zen Community
Hi Cheese! (love that name!)

As Dale says, you need to set your overflow CSS to get this to work.

This works for us, where mySelect is our multiSelectSet:

var ctrl=zenPage.getComponentById('mySelect');
var div=ctrl.getEnclosingDiv();
divElement=document.getElementById(div.id);
divElement.style.height="50px";
divElement.style.width="100px";
divElement.style.backgroundColor="red";
divElement.style.overflow="scroll";

-Roberto

On Feb 10, 4:10 pm, Dale du Preez <dale.dupr...@intersystems.com>
wrote:

Cheese

unread,
Feb 10, 2012, 5:24:39 PM2/10/12
to InterSystems: Zen Community

Outstanding. Here's what I did:

<multiSelectSet id="myMSS" enclosingStyle="background: #d5e6d6;height:
150px;overflow-y: scroll;"/>

Thank you both very much!
> > > Cheese- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages