tpatput
04-20-2007, 10:38 AM
this is ol 3.3.3
I'm using a list component bound to a dataset. The list (dataset) can change at runtime based on other user selections, and the text sizes in the list can vary.
Right now I'm changing the width of the list on the fly to accomodate longer text, but I'd rather use a horizontal scroll bar to preserve page space.
in this simple example, the group1 text fits the dropdown, but the group2 text is clipped. I'm looking for a way to get a horizontal scrollbar to appear on the group2 dropdown so the longer text can be scrolled.
<canvas debug="true" layout="class:simplelayout; axis:x; spacing:5">
<dataset name="ds">
<root>
<group1>
<txt>apache</txt>
<txt>maven</txt>
<txt>myfaces</txt>
</group1>
<group2>
<txt>a longer description of the apache project</txt>
<txt>a long description of the maven project</txt>
<txt>a much much longer description of the myfaces and jsf frameworks</txt>
</group2>
</root>
</dataset>
<view id="listview">
<list id="mylist" name="mylist" datapath="ds:/root/group1">
<textlistitem datapath="txt" text="$path{'text()'}" value="$path{'text()'}"/>
</list>
</view>
<button text="use group2" onclick="toggle()">
<method name="toggle">
listview.mylist.setAttribute('datapath', 'ds:/root/group2');
</method>
</button>
<button text="use group1" onclick="toggle()">
<method name="toggle">
listview.mylist.setAttribute('datapath', 'ds:/root/group1');
</method>
</button>
</canvas>
I've searched the forum, and maybe I've missed something in the docs, but I can't see how to get text to scroll horizontally with a list component. Has anyone resolved this issue?
Thanks for your help in advance.
Tom
I'm using a list component bound to a dataset. The list (dataset) can change at runtime based on other user selections, and the text sizes in the list can vary.
Right now I'm changing the width of the list on the fly to accomodate longer text, but I'd rather use a horizontal scroll bar to preserve page space.
in this simple example, the group1 text fits the dropdown, but the group2 text is clipped. I'm looking for a way to get a horizontal scrollbar to appear on the group2 dropdown so the longer text can be scrolled.
<canvas debug="true" layout="class:simplelayout; axis:x; spacing:5">
<dataset name="ds">
<root>
<group1>
<txt>apache</txt>
<txt>maven</txt>
<txt>myfaces</txt>
</group1>
<group2>
<txt>a longer description of the apache project</txt>
<txt>a long description of the maven project</txt>
<txt>a much much longer description of the myfaces and jsf frameworks</txt>
</group2>
</root>
</dataset>
<view id="listview">
<list id="mylist" name="mylist" datapath="ds:/root/group1">
<textlistitem datapath="txt" text="$path{'text()'}" value="$path{'text()'}"/>
</list>
</view>
<button text="use group2" onclick="toggle()">
<method name="toggle">
listview.mylist.setAttribute('datapath', 'ds:/root/group2');
</method>
</button>
<button text="use group1" onclick="toggle()">
<method name="toggle">
listview.mylist.setAttribute('datapath', 'ds:/root/group1');
</method>
</button>
</canvas>
I've searched the forum, and maybe I've missed something in the docs, but I can't see how to get text to scroll horizontally with a list component. Has anyone resolved this issue?
Thanks for your help in advance.
Tom