When viewing the list widget in NS6, the list items
have a height of 0. This is due to the fact that the
height for list items is not currently set in
list.js. A fix for this requires two things:
First, that a itemHeight property be added to the list
object. Something like this:
----Begin Quote----
function List(h){
this.itemHeight = h||20;
Second, the arrangeItems function would need to be
changed as follows:
List.prototype.arrangeItems = function(){
this.totalHeight = this.listStyle.borders;
for (var i=0;i<this.items.length;i++){
this.items[i].setHeight
(this.itemHeight);
this.items[i].moveTo
(this.listStyle.borders,this.totalHeight);
this.items[i].setWidth(this.w-
this.listStyle.borders*2);
this.totalHeight =
this.totalHeight+this.items
[i].h+this.listStyle.spacing;
}
this.setHeight(this.totalHeight-
this.listStyle.spacing+this.listStyle.borders);
};
----End Quote----
All we have done here is add the following line of
code to the top of the for loop:
this.items[i].setHeight(this.itemHeight); to
Logged In: YES
user_id=16618
The problem seems to be that getContentHeight is not
working correctly. So if that were working correctly, none
of this would be needed.