Patches item #439724, was opened at 2001-07-09 07:12
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305757&aid=439724&group_id=5757

Category: None
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: David Hanlon (hanlond)
>Assigned to: Robert Rainwater (rainwater)
Summary: Problems with List widget

Initial Comment:
Calling List.select(item) wasn't setting 
the 'selected' colors for the item. I added a call to 
ListItem.setSelected(true), as follows:

List.prototype.select = function(item) { 
        this.selectedIndex = this.getIndexOf(item); 
        this.selectedItem = item; 
        this.selectedItem.setSelected(true);
        if (this.multiMode) return; 
        for (var i=0;i<this.items.length;i++)
        { 
                if (this.items[i] != item) this.items
[i].setSelected(false); 
        } 
        this.invokeEvent("select"); 
};

Also, if you try to create a list with transparent 
background (passing 'transparent' for background color 
values in List.setColor()), the background showed up 
as dark blue under N4.x. I did a quick fix, changing 
ListItem.setColors(), and List.setColors(), as follows:

List.prototype.setColors = function
(bg,bgRoll,bgSelect,textNormal,textRoll,textSelect){ 
        var ls = this.listStyle; 
        ls.bg = (is.ns4 && bg == 'transparent') ? 
null : bg||ls.bg; 
        ls.bgRoll = (is.ns4 && bgRoll 
== 'transparent') ? null : bgRoll||ls.bgRoll; 
        ls.bgSelect = (is.ns4 && bgSelect 
== 'transparent') ? null : bgSelect||ls.bgSelect; 

ListItem.prototype.setColors = function
(bg,bgr,bgs,tn,tr,ts) { 
        var s = this.itemStyle; 
        s.bgcolor = is.ns4 ? bg : bg||'#eeeeee'; 
        s.bgColorRoll = is.ns4 ? bgr : bgr||'#cccccc'; 
        s.bgColorSelect = is.ns4 ? bgs : 
bgs||'lightblue'; 

Finally, I'm finding that the list is always drawn 
initially using black for the text color. The correct 
colors start being used once you initially mouse over 
each list item.

Dave Hanlon

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305757&aid=439724&group_id=5757

_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev

Reply via email to