Hi Walden,
I tried using gwt-1.5.2 and gwt-1.5.
If gwt-1.5.2 is used on IE6 it happens only for the child node. Root level
nodes are working fine. But on IE7 and Firefox it is reproducible for all
the nodes.
If gwt-1.5 is used on IE6 everything works fine. But on Firefox it is
reproducible for all the nodes.
You can use this code below to reproduce the issue.
TreeTest.java
package com.test.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Tree;
import com.google.gwt.user.client.ui.TreeItem;
import com.google.gwt.user.client.ui.TreeListener;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class TreeTest implements EntryPoint {
Tree myTree;
/**
* This is the entry point method.
*/
public void onModuleLoad() {
myTree = new Tree();
for (int i = 0; i < 10; i++) {
TreeItem prItm = new TreeItem("Parent_" + i);
TreeItem chItm = new TreeItem("Child_" + i);
prItm.addItem(chItm);
myTree.addItem(prItm);
}
myTree.addTreeListener(treeListener);
RootPanel.get().add(myTree);
}
TreeListener treeListener = new TreeListener() {
public void onTreeItemSelected(TreeItem item) {
Window.alert(item.getText() + " selected");
}
public void onTreeItemStateChanged(TreeItem item) {
// TODO Auto-generated method stub
}
};
}
TreeTest.css
.gwt-Tree {
border: 1px solid blue;
margin-left: 30px;
}
.gwt-Tree .gwt-TreeItem {
border: 1px solid red;
}
- Litty
On Wed, Nov 5, 2008 at 2:27 AM, walden <[EMAIL PROTECTED]> wrote:
>
> What version of GWT are you using? I'm trying the same thing in the
> GWT showcase and not getting the result you are.
>
> On Nov 4, 10:51 am, "Litty Preeth" <[EMAIL PROTECTED]> wrote:
> > Hi Walden,
> >
> > I put a border to the TreeItem and also a border to the tree itself. So
> if I
> > click outside the border of the TreeItem, but inside the border of the
> tree;
> > the item in the vertical level where I click gets selected.
> >
> > - Litty
> >
> >
> >
> > On Tue, Nov 4, 2008 at 9:10 PM, walden <[EMAIL PROTECTED]>
> wrote:
> >
> > > Litty,
> >
> > > How can you be sure you are actually clicking outside the TreeItem?
> >
> > > Walden
> >
> > > On Nov 4, 12:27 am, Litty Preeth <[EMAIL PROTECTED]> wrote:
> > > > Hi All,
> >
> > > > I have a Tree on my page which I have added into a ScrollPanel. My
> > > > problem is that if I click even outside the TreeItem (but within the
> > > > scrollpanel) the item is getting selected (onTreeItemSelected of the
> > > > TreeListener gets fired). Please help me on this issue.
> >
> > > > Thanks in advance,
> > > > Litty- Hide quoted text -
> >
> > - Show quoted text -
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---