:: Forum >>

ListBox Question

I am a licensed ActiveWidgets user. I need to use a listbox control by itself (no grid). How would I modify the example at the bottom so that it:

(1) has a 1 pixel border of color #9A9381
(2) has only a list, no images
(3) is 200 pixels wide by 300 pixels tall
(4) is located absolutely at left:100;top:100
(5) uses black 9px Verdana font
(6) set the selection color to #CF732A, with white font

<script>
var obj = new AW.UI.List;
obj.setItemText(["Home", "Favorites", "Font size", "Search"]);
obj.setItemImage(["home", "favorites", "fontsize", "search"]);
obj.setItemCount(4);
document.write(obj);
</script>

Thank you for your help.

- Eric Juvet

ericj
Monday, October 9, 2006
You have to assign an ID to the list control and add some CSS -

<style>

#myList {
    position: absolute;
    left: 100px;
    top: 100px;
    width: 200px;
    height: 300px;
    border: 1px solid #9A9381;
    font: 9px Verdana;
}


#myList .aw-items-selected {
    color: #FFFFFF;
    background: #CF732A;
}


</style>
<script>

    var obj = new AW.UI.List;
    obj.setId("myList");
    obj.setItemText(["Home", "Favorites", "Font size", "Search"]);
    obj.setItemCount(4);
    document.write(obj);

</script>
Alex (ActiveWidgets)
Monday, October 9, 2006
Thank you very much, greatly appreciate your help.
ericj
Thursday, October 12, 2006

This topic is archived.


Back to support forum

Forum search