Announcement

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

    setShowResizeBar and showContextMenu unpleasant effect with screen scrollbars

    I have a code example when when calling showContextMenu scrollbars appear for the entire screen. Is it possible to fix this error?

    Code:
    public void onModuleLoad() {
            HLayout mainLayout = new HLayout();
            mainLayout.setWidth100();
            mainLayout.setHeight100();
    
            Label navigationLabel = new Label();
            navigationLabel.setContents("Navigation");
            navigationLabel.setAlign(Alignment.CENTER);
            navigationLabel.setOverflow(Overflow.HIDDEN);
            navigationLabel.setWidth("30%");
            navigationLabel.setShowResizeBar(true);
    
            mainLayout.addMember(navigationLabel);
    
            VLayout vLayout = new VLayout();
            vLayout.setWidth("70%");
    
            VLayout listingLayout = new VLayout();
            listingLayout.setOverflow(Overflow.HIDDEN);
            listingLayout.setHeight("30%");
            listingLayout.setShowResizeBar(true);
    
            Label listingLabel = new Label();
            listingLabel.setContents("Listing");
            listingLabel.setAlign(Alignment.CENTER);
            listingLabel.setOverflow(Overflow.HIDDEN);
            listingLabel.setHeight("30%");
    
            Button menuButton = new Button("show menu");
            menuButton.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    MenuItem goProjectEditor = new MenuItem("menu item 1");
                    MenuItem goPageEditor = new MenuItem("menu item 2");
    
                    com.smartgwt.client.widgets.menu.Menu goEditor = new com.smartgwt.client.widgets.menu.Menu();
                    goEditor.setItems(goProjectEditor, goPageEditor);
                    goEditor.showContextMenu();
                }
            });
            listingLayout.addMember(listingLabel);
            listingLayout.addMember(menuButton);
    
            Label detailsLabel = new Label();
            detailsLabel.setContents("Details");
            detailsLabel.setAlign(Alignment.CENTER);
            detailsLabel.setOverflow(Overflow.HIDDEN);
            detailsLabel.setHeight("70%");
    
            vLayout.addMember(listingLayout);
            vLayout.addMember(detailsLabel);
    
            mainLayout.addMember(vLayout);
            mainLayout.draw();
        }
    Click image for larger version

Name:	Zwischenablage-1.jpg
Views:	83
Size:	27.2 KB
ID:	268926
    Last edited by Hirn; 26 Oct 2022, 09:57.
Working...
X