Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Menu size

    Why is the menu so large in my screenshot? Using 6.0-p20160519
    Code:
    public void onModuleLoad() {
            VLayout layout = new VLayout();
    
            final DynamicForm df = new DynamicForm();
            FileItem imageItem = new FileItem();
            df.setItems(imageItem);
    
            final Menu menu = new Menu();
            menu.setWidth(505);
            menu.setHeight(440);
            menu.setAutoDraw(false);
    
            final HStack editButtons = new HStack(3);
            editButtons.setDefaultLayoutAlign(VerticalAlignment.CENTER);
            editButtons.setSnapTo("TR");
            editButtons.setHeight("90%");
            editButtons.setAutoDraw(false);
            editButtons.setMembers(createEditButton("Cut"), createEditButton("Copy"), createEditButton("Paste"));
    
            final MenuItem editMenuItem = new MenuItem("Edit");
            editMenuItem.setShowRollOver(false);
            editMenuItem.setEmbeddedComponentFields("key");
            editMenuItem.setEmbeddedComponent(editButtons);
            menu.setData(new MenuItemSeparator(), editMenuItem, new MenuItemSeparator());
    
            final IMenuButton menuButton = new IMenuButton("Menu", menu);
            menuButton.setWidth(100);
            menuButton.setAutoDraw(false);
    
            layout.addMember(menuButton);
            layout.setHeight100();
            layout.setWidth100();
            layout.draw();
    
        }
    
        private Canvas createEditButton(String string) {
            return new IButton();
        }
    Click image for larger version

Name:	Bildschirmfoto 2016-07-21 um 12.55.35.png
Views:	71
Size:	36.9 KB
ID:	239279

    #2
    Edit: I didn't see the setHeight() setting ;-)

    Comment

    Working...
    X