Note that there are some explanatory texts on larger screens.

plurals
  1. POGWT Tree styling
    primarykey
    data
    text
    <p>I have a normal Tree widget which I want to style. I know Tree widget has to following styles:</p> <p>•.gwt-Tree { the tree itself } •.gwt-Tree .gwt-TreeItem { a tree item } •.gwt-Tree .gwt-TreeItem-selected { a selected tree item }</p> <p>The webb people sent me this CSS and HTML as example how it should look like</p> <p>css:</p> <pre><code>/* Menu styling */ #menu li { margin-top: 8px; margin-bottom: 8px; /*margin: 8px 0 8px 0;*/ padding: 0; } .menuitems,.indented { background: none repeat scroll 0 0 transparent; border-width: 0; float: left; font-size: 100%; list-style-image: none; list-style-type: none; margin: 0; padding: 0; } .menuitems a { * display: block; * float: left; * clear: left; } .indented { border-left: 1px solid #005284; border-right: none; padding-left: 5px; margin-left: 20px; } .menuitems a { color: #000000; display: block; } .menuitems a:hover { text-decoration: underline; } .currentpage a { color: #C60; font-weight: bold; } </code></pre> <p>and html </p> <pre><code>&lt;div id="menu"&gt; &lt;ul class="menuitems"&gt; &lt;li&gt; &lt;a href="abc"&gt;Option 1&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="abc"&gt;Option 2&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="abc"&gt;Option 3&lt;/a&gt; &lt;ul class="indented"&gt; &lt;li class="currentpage"&gt; &lt;a href="blabla"&gt;subselection&lt;/a&gt; &lt;/li&gt; &lt;li&gt; subselection 2 &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="abc"&gt;Option 4&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>I'm struggling a bit to get this to look as they want. I am using uibinder.</p> <ul> <li>Should I use a .css file or ui:style in the ui binder file?</li> <li>Do I need to remove the default styles with "removeStyleName" and setStyleName on every tree item?</li> </ul> <p>Thx</p> <p>Update:</p> <p>Found out how to add images to leafs. Make an interface: </p> <pre><code>public interface TreeResources extends Resources { ImageResource treeOpen(); ImageResource treeClosed(); } </code></pre> <p>Create the tree with GWT.create. make sure images with matching names (treeOpen.gif, treeClosed.gif) are in the same folder, or you could and annotations to point them out.</p> <p>Question is how to get them on the right side instead of the left side? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload