context menu with tree

Im using dhtmlxtree pro with context menu and have some questions.



1. Can i resize the menu items or change their style properties? (bgcolor, padding,…)



2. I want the menu to pop for only specific tree items but when im hiding the items with the OnShowMenuHandler the menu still pop (a thin empty line).





  1. Can i resize the menu items or change their style properties? (bgcolor, padding,…)

    menu is instance of dhtlmxMenu and can be controlled by related API, there is no methods for separate properties, but you can define custom css class and assign it to menu item.
    You can set custom class assigned to menuItem by using “className” attribute of related item in XML.
    Or later change css class property by
        contextMenu.menu.getItem(ID).CSSTag.className=“custom”


    >>2. I want the menu to pop for only specific tree items but when im hiding the items
    instead of hiding items, just add
        return false;
    as last line of onShow handler - as result menu showing will be blocked ( it will stay hidden )