1

我只是想知道......如何在纯 GWT 中为 ScrollPanel 从右到左设置垂直滚动条?或者也许有一些替代方案?

谢谢

4

1 回答 1

2

如果您只想更改滚动面板的滚动条方向,可以将以下 CSS 规则添加到该面板

direction: rtl;

我厌倦了这个并且它有效。查看此代码。

ScrollPanel scrollPanel = new ScrollPanel(new Label("I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?I am just wondering... How to set vertical scroll bar from right to left side for ScrollPanel in pure GWT? Or maybe there is some alt walk-around?"));
    scrollPanel.setSize("100px", "100px");
    scrollPanel.setTitle("mypanel");
    scrollPanel.addStyleName("dit");
    RootPanel.get().add(scrollPanel);

而css类就像

.dit {
    direction: rtl;
    text-align: left !important; /*Only if you want to set text alignment to left.*/
}

(仅在 chrome 中测试。)

于 2013-05-31T20:54:15.553 回答