Formatting TreeItems with CSS

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Formatting TreeItems with CSS

Postby ttownsend » Mon Jun 11, 2007 1:36 pm

I'm new to GWT and GWT Designer, so perhaps I'm just missing something here. I have a tree that displays multiple parent and child nodes. I'm trying to use style sheets to make the lowest-level child nodes appear differently in the tree. To accomplish this, I created a custom style sheet using the CSS Style Selection dialog (e.g. .gwt-myCustomStyle).

When the code runs, the default CSS (.gwt-Tree .gwt-TreeItem) is used up until I populate the lowest-level TreeItems, at which point I use setStyleName to apply the custom style for that particular item.

My problem is, it's not working. No matter what I do, the TreeItems seem to use only the default CSS, and ignore my commands to use my own custom CSS. As I said, my need is to have different levels formatted differently. Can this be done? If so, what am I doing wrong?

Thanks in advance.

- Tom
ttownsend
 
Posts: 1
Joined: Mon Jun 11, 2007 8:45 am

Postby Alexander.Mitin » Tue Jun 12, 2007 5:21 am

This is possibly a bug in GWT. Looks like style name applies to wrong DOM element (see TreeItem constructor and UIObject.setStyleName() method).
Please ask about this on GWT forum at http://groups.google.com/group/Google-Web-Toolkit
Alexander Mitin
Alexander.Mitin
Moderator
 
Posts: 155
Joined: Fri Jan 19, 2007 3:57 am


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests