PDA

View Full Version : how to change the menu layout if there are too many menuitems?



thunderat
29 May 2007, 2:26 AM
http://extjs.com/forum/attachment.php?attachmentid=530&stc=1&d=1180434333

i make a menu by the code:
"
for(var i=0; i<nameList.length-1; i++)

{
var item = menu1.add({
text:nameListe[i],
icon:'images/search.gif' });
item.on('click', onItemClick);
}
"

as you see,if "i"value is too large,the menu is so long that we have to use page scroll,it's not so good. can you tell me how to make the menu better ?
thanks !!

Animal
29 May 2007, 2:34 AM
Split it into two columns. Or into Math.floor((nameList.length + 24) / 25) columns. Fairly easy to do.