Skip to main content

Netbeans Dojo Tree component.css

1 reply [Last post]
fakhreldeen
Offline
Joined: 2008-04-13
Points: 0

Hello,

i have a jmaki Netbeans 6.0 project, and I would like to edit some of the css styles of the widgets, however, there is no component.js in the widget's subfolder, only component.js, component.html, and widget.json. i tried to edit the widget.json file to include a style, but that didn't work...i created a component.css file in the tree subfolder, but that didn't work, maybe i have the css written incorrectly

here is the contents of my component.css file for the dojo.Tree component

.dojoTree {

color:#FFFFFF;
}

i would like to make the color of the tree to be white, since i have a blue page background

thank you for your help
sam

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi,

The dojo widgets in the .43 release which I suspect what you are using have their css managed by dojo which can make things more difficult to update. In many cases the CSS styles are applied after the widget and CSS files are loaded so it ends up that some changes don't stick.

I just test the following and this works by forcing your styles to reload after dojo's basically overriding them.

Create the following component.css

.dojoTreeNodeLabelTitle {
color : red;
}

At line 243 in the component.js add the following line of JavaScript. This needs to occur after the _widget.tree

jmaki.loadStyle(wargs.widgetDir + "/component.css");

Now all you need to do is change the color to what you want.

You can also do a search for the dojoTreeNodeLabelTitle in your app and change the default style dojo uses in the Tree.css file

Let me know if this donesn't work for you.

-Greg