"警告:日志:元素parentNode null" smartgwt 5.0中的动画效果警告

时间:2015-07-10 07:53:55

标签: smartgwt

我想创建具有动画效果的工具条菜单" slide",它在smartgwt 3.0中完美运行但是当我升级smartgwt 5.0时,这个警告很火。我是goint设置菜单动画效果使用 toolStripMenuButton.setMenuAnimationEffect("滑动&#34);在ToolStripMenuButton中, 但警告是fire元素父节点null

我还附上代码和警告屏幕截图..

先谢谢你......

    ToolStrip toolStrip = new ToolStrip();  
    toolStrip.setWidth(600);  
    ToolStripMenuButton menuButton = new ToolStripMenuButton("File");  
    menuButton.setWidth(100);
    menuButton.setSmoothFade(true);  
    menuButton.setCanDragReposition(true);
    menuButton.setCanDragResize(true);
    menuButton.setDragAppearance(DragAppearance.TARGET);
    menuButton.setMenuAnimationEffect("slide"); 

    Menu menu = new Menu();  
    menu.setShowShadow(true);  


    MenuItem newItem = new MenuItem("New", "", "Ctrl+N");  
    MenuItem openItem = new MenuItem("Open", "", "Ctrl+O");  
    MenuItem saveItem = new MenuItem("Save", "", "Ctrl+S");  
    MenuItem saveAsItem = new MenuItem("Save As", "");  


    menu.setItems( newItem, openItem,  saveItem, saveAsItem);  

    menuButton.setMenu(menu);
    toolStrip.addMenuButton(menuButton);  

    canvas.addChild(toolStrip);
    canvas.draw();  

enter image description here

0 个答案:

没有答案