开发者

How to customize look and feel of standard GWT components?

开发者 https://www.devze.com 2023-02-12 19:51 出处:网络
I have created GWT web application with standard Tree component from GWT. By default: Tree Implemented as a DIV containing nested TreeItems. The style name gwt-Tree applies to the DIV and the style ov

I have created GWT web application with standard Tree component from GWT. By default: Tree Implemented as a DIV containing nested TreeItems. The style name gwt-Tree applies to the DIV and the style overflow defaults to auto. <div class="gwt-Tree" style="overflow: auto;">

<div style="position: relative; margin-left: 16;" (handle)>

<table>

<tr>

<td></td>

<td></td>

</tr>

</table>

</div>

Where is the place in GWT source c开发者_JAVA技巧ode where I can change Tree rendering on my own design?


You should use CSS to style GWT components.

Here's a simple example using a UIBinder template:

<ui:style>
  .myTree {
    background-color: red;
  }
</ui:style>
<g:HTMLPanel>
  <g:Tree styleName="{style.myTree}" />
</g:HTMLPanel>

See this developer's guide also.

0

精彩评论

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