If I would want to modify the visual theme (ie. Silver Wave or Black Ops) can this be done in the code or I would need to change the css/js in the theme itself?
For example, I’d like to change the the way how group box (Canvas.setIsGroup(true)) is drawn. I’d like the border around the group to be silver and 1px wide for the Silver Wave and the title be in bold.
You can modify the appearance of the components in various ways - check the documentation for the component(s) in question to see what properties you need to set. This can be done directly in your application code without creating a new skin, and this is the approach you’d typically take to modify the appearance of specific components in your application.
However if you’re changing the appearance of components across your entire application, it usually makes sense to work with a new skin rather than have piecemeal changes within your application code.
There is some fairly good documentation on how to create and modify skins - we’d suggest you start by looking here.
Note that while the approaches discussed in the SmartClient skinning guide do work with SmartGWT, it does require making some trivial changes to a JavaScript file (load_skin.js). It’s likely we’ll add a Java wrapper for this in the future.
Also of note, where CSS is required for skinning, it’s trivial CSS like fonts, background colors and borders. You don’t need to understand CSS-based layout or browser box models or any of that stuff. More on that here.
Specifically on SmartGWT and the isGroup feature, the docs in 7.0 beta are incomplete for this and are being fleshed out for 7.0 final. But you could achieve what you want system-wide with this code:
The groupBorderCSS worked, thank you.
I’m still trying to get familiar with SmartGWT structure, is there a similar property to set the group label font?
I’ll look into adding SmartGWT API’s for these. Currently the “AutoChild” configuration via SmartGWT API is not yet available. It is a very powerful mechanism that allows a deep level of configurability. Can’t wait to get this in!
Hi. We used this method to style our group labels with great success. We recently upgraded to Smartgwt 1.3 from 1.2, and now it doen’t work anymore. Of course, we may have done something ourselves to break it, but I wanted to check here if there is any obvious reason why this wouldn’t work anymore.