【问题标题】:GWT : How to apply a "scroll !important" on RichTextAreaGWT:如何在 RichTextArea 上应用“滚动!重要”
【发布时间】:2015-07-17 09:50:22
【问题描述】:

在 GWT 2.7 中,我希望我的滚动条在我的 RichTextArea 上始终可见,即使是空的也是如此。

通常,在我的 FlowPanel 上,我可以简单地应用一个

    overflow: scroll !important;

但在 RichTextArea 上,它不起作用。

感谢您的帮助,

【问题讨论】:

    标签: gwt richtextarea


    【解决方案1】:

    请使用这个:

    RichTextArea rtArea = new RichTextArea();                 
    rtArea.getElement().getStyle().setOverflow(Overflow.SCROLL);                      
    

    您还可以根据自己的选择设置高度和宽度。

    【讨论】:

    • 谢谢你的回答,不幸的是这不起作用,我已经尝试过......例如,这不起作用:rtArea.getElement().getStyle().setOverflow(Overflow.SCROLL); 但是这个,没关系:rtArea.getElement().getStyle().setBackgroundColor("red"); 我没有'不知道为什么...
    • 实际上 GWT 将 RichTextArea 渲染为 iframe。只有当输入的文本超过文本区域的宽度时,滚动才可见。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多