vaadin VerticalSplitPanel,水平滚动条出现但我看不到右边的结束线
vaadin VerticalSplitPanel, horizontal scrollbar appears but i can't see the end line on the right
我使用 VerticalSplitPanel
作为 HorizontalSplitPanel
的第二个组成部分。
当我将面板添加为 VerticalSplitPanel
的第二个组件时,我可以看到垂直滚动条和水平滚动条(参见屏幕截图)。
我的问题是我无法滚动到右侧行的末尾。
这是我的源代码:
hsplit = new HorizontalSplitPanel();
hsplit.setSplitPosition(13, Unit.PERCENTAGE);
// Set the 1 pixel wide small style
hsplit.addStyleName(Reindeer.SPLITPANEL_SMALL);
vsplit.setSecondComponent(hsplit);
Panel treePanel = new Panel();
treePanel.setHeight(100, Unit.PERCENTAGE);
treePanel.setContent(treeDataSourceManager.getView());
treePanel.setStyleName("tree-panel");
hsplit.setFirstComponent(treePanel);
navbar = new VerticalLayout();
GridLayout secondaryNavBar = new GridLayout(3, 1);
secondaryNavBar.setWidth("100%");
secondaryNavBar.addComponent(userPreferencesBar, 0, 0);
secondaryNavBar.addComponent(paginationView, 2, 0);
navbar.addComponent(alphaNavigationView);
navbar.addComponent(secondaryNavBar);
thirdPartLayout = new VerticalSplitPanel();
thirdPartLayout.setStyleName("thirdPart");
thirdPartLayout.setFirstComponent(navbar);
thirdPartLayout.setSplitPosition(60, Unit.PIXELS);
thirdPartLayout.setSecondComponent(mwiListResultView);
hsplit.setSecondComponent(thirdPartLayout);
public class MwiListResultView extends CustomComponent {
public MwiListResultView() {
setSizeUndefined();
setCompositionRoot(getResultLayout());
}
private Panel getResultLayout() {
Panel panel = new Panel();
VerticalLayout resultLayout = new VerticalLayout();
panel.setContent(resultLayout);
panel.setWidth("1380px");
resultLayout.setStyleName("mwiWorksResultLayout");
resultLayout.setSizeUndefined();
for (int i = 0; i < 200; i++) {
Label l = new Label("test horizontal scrollbar right side not
shown totaly
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaattttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttXXXXXXXXXXXX");
resultLayout.addComponent(l);
}
return panel;
}
}
输出的屏幕截图
底部有第二个滚动条,但没有出现。
我在根布局上将 margin 设置为 true,然后删除了 Panel。
问题已解决。
private VerticalLayout getResultLayout() {
VerticalLayout resultLayout = new VerticalLayout();
VerticalLayout .setWidth("1380px");
resultLayout.setStyleName("mwiWorksResultLayout");
resultLayout.setSizeUndefined();
for (int i = 0; i < 200; i++) {
Label l = new Label("test horizontal scrollbar right side not
shown totaly
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaattttttttttttttttttttttttttttttttttttttttttttttttttt
tttttttttttttttttttttttttXXXXXXXXXXXX");
resultLayout.addComponent(l);
}
return resultLayout;
}
这是一个 vaadin 错误,因为没有在根布局上将 margin 设置为 true,底部滚动条不会出现。
我会创建一个工单。
我使用 VerticalSplitPanel
作为 HorizontalSplitPanel
的第二个组成部分。
当我将面板添加为 VerticalSplitPanel
的第二个组件时,我可以看到垂直滚动条和水平滚动条(参见屏幕截图)。
我的问题是我无法滚动到右侧行的末尾。
这是我的源代码:
hsplit = new HorizontalSplitPanel();
hsplit.setSplitPosition(13, Unit.PERCENTAGE);
// Set the 1 pixel wide small style
hsplit.addStyleName(Reindeer.SPLITPANEL_SMALL);
vsplit.setSecondComponent(hsplit);
Panel treePanel = new Panel();
treePanel.setHeight(100, Unit.PERCENTAGE);
treePanel.setContent(treeDataSourceManager.getView());
treePanel.setStyleName("tree-panel");
hsplit.setFirstComponent(treePanel);
navbar = new VerticalLayout();
GridLayout secondaryNavBar = new GridLayout(3, 1);
secondaryNavBar.setWidth("100%");
secondaryNavBar.addComponent(userPreferencesBar, 0, 0);
secondaryNavBar.addComponent(paginationView, 2, 0);
navbar.addComponent(alphaNavigationView);
navbar.addComponent(secondaryNavBar);
thirdPartLayout = new VerticalSplitPanel();
thirdPartLayout.setStyleName("thirdPart");
thirdPartLayout.setFirstComponent(navbar);
thirdPartLayout.setSplitPosition(60, Unit.PIXELS);
thirdPartLayout.setSecondComponent(mwiListResultView);
hsplit.setSecondComponent(thirdPartLayout);
public class MwiListResultView extends CustomComponent {
public MwiListResultView() {
setSizeUndefined();
setCompositionRoot(getResultLayout());
}
private Panel getResultLayout() {
Panel panel = new Panel();
VerticalLayout resultLayout = new VerticalLayout();
panel.setContent(resultLayout);
panel.setWidth("1380px");
resultLayout.setStyleName("mwiWorksResultLayout");
resultLayout.setSizeUndefined();
for (int i = 0; i < 200; i++) {
Label l = new Label("test horizontal scrollbar right side not
shown totaly
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaattttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttXXXXXXXXXXXX");
resultLayout.addComponent(l);
}
return panel;
}
}
输出的屏幕截图
底部有第二个滚动条,但没有出现。 我在根布局上将 margin 设置为 true,然后删除了 Panel。 问题已解决。
private VerticalLayout getResultLayout() {
VerticalLayout resultLayout = new VerticalLayout();
VerticalLayout .setWidth("1380px");
resultLayout.setStyleName("mwiWorksResultLayout");
resultLayout.setSizeUndefined();
for (int i = 0; i < 200; i++) {
Label l = new Label("test horizontal scrollbar right side not
shown totaly
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaattttttttttttttttttttttttttttttttttttttttttttttttttt
tttttttttttttttttttttttttXXXXXXXXXXXX");
resultLayout.addComponent(l);
}
return resultLayout;
}
这是一个 vaadin 错误,因为没有在根布局上将 margin 设置为 true,底部滚动条不会出现。 我会创建一个工单。