Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要 mgwt 中的水平 ScrollPanel 并尝试使用:
contactHorizontalScrollPanel = new ScrollPanel(); contactHorizontalScrollPanel.setShowScrollBarX(true); contactHorizontalScrollPanel.setScrollingEnabledX(true);
但我的面板总是有一个垂直的滚动条。
我认为这可能会有所帮助。使用标准 GWT 面板:
contactHorizontalScrollPanel = new ScrollPanel(); HorizontalPanel hPanel = new HorizontalPanel(); for (int i = 0; i < 5; i++) { Button btn = new Button("" + i); hPanel.add(btn); } contactHorizontalScrollPane.setWidget(hPanel);