开发者

How to access/style horizontal split view's split

开发者 https://www.devze.com 2022-12-24 00:30 出处:网络
I\'m开发者_JS百科 trying to set the style name of the div of the split between the two widgets of a HorizontalSplitPanel in order to CSS-style it. Is there any way to do this?According to the javadocs

I'm开发者_JS百科 trying to set the style name of the div of the split between the two widgets of a HorizontalSplitPanel in order to CSS-style it. Is there any way to do this?


According to the javadocs for HorizontalSplitPanel, you should change the .gwt-HorizontalSplitPanel .hsplitter { the splitter } style. Just make sure you set up your CSS styles to take precedence over the core GWT ones.


Figured a way out myself, though it is definitely a bit "hacky":

    Element split = (Element)hSplit.getElement().getChild( 0 ).getChild( 1 );
    split.setClassName( css.horizontalSplit() );

If anyone has a more elegant solution, I'd love to hear it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号