hi,
we are using milonic with the menu data being dynamic generated, that also dynamically resizes and sets scrollbars if the menu data is to long, so the menu doesnt overlap the page footer image (contains corporate logos that they dont want covered up), this works quite well, but the issue i have is that when the scroll bars come on,id like to dyanamically reset the menu width to be current width - scroll bar width, however, nothing i have tried has an effect on the width, it seems once the menu's have been contructed, the width cannot be changed, i did see a mention that some propertie changes required the menu to be refreshed, is there such a function, like redraw or refresh?
thanks
menuwidth/menu item width
Hi,
The function for redrawing menus is BDMenu(menunumber).
You need to know the menu number in order to redraw the menu and this can be found by using the getMenuByName("menuname") function.
You could try this.
menunumber=getMenuByName("samplemenu")
_m[menunumber][4]=200 // changes the width to 200 pixels
BDMenu(menunumber) // redraws the menu
Hope this helps
-- Andy
The function for redrawing menus is BDMenu(menunumber).
You need to know the menu number in order to redraw the menu and this can be found by using the getMenuByName("menuname") function.
You could try this.
menunumber=getMenuByName("samplemenu")
_m[menunumber][4]=200 // changes the width to 200 pixels
BDMenu(menunumber) // redraws the menu
Hope this helps
-- Andy
True, if you need to get a reference to a menu object (e.g., to use the gpos() or spos() functions). But you don't need a menu object to use the BDMenu() function, just a menu number -- an integer used as an index into the _m[] array -- which is what getMenuByName() returns. So, although it won't hurt (just an extra concatenation and function call), the second line of code above isn't necessary to use BDMenu().darrinh wrote:...althought it seems you have to prepend "menu" to the returned value of getMenuByName in order to get a valid menu object. eg:
var menuName = getMenuByName("Main Menu");
var menuObj = gmobj("menu"+menuName);
m[menuName][4] = 200;
BDMenu(menuName);
Cheers,
Kevin