Warning: curl_setopt() [function.curl-setopt]: Unable to access /tmp/binget-cookie.txt in /home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php on line 135

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /home/flexstu1/public_html/wp-content/plugins/sniptorg-highlighted-code-embed/snipt_org_embed.php on line 136

In my previous post, I explained how to create nice gradients using Degrafa’s CSSSkin. Once again, CSSSkin is one of the very powerful, yet overlooked function of the Degrafa framework (look at this, or that for those who would still doubt it). But it has in my opinion a limitation: it works almost only for containers (Canvas, Panel, List, etc). But as it stands by default in the latest version (Beta 3.1), it doesn’t work for buttons (Button, ButtonBar and the like). When it comes to the define CSS tags like upSkin, downSkin, selectedOverSkin, etc, there’s no choice but to use tailor made classes extending GraphicBorderSkin like in this example. But actually, there’s a rather easy way to use CSSSkin defined in a CSS file only, by simply extending CSSSkin.

This is why I’ve created the following class, CSSButtonSkin:

asdf
asp
fds
';document.write(content);
[code snippet: http://snipt.org/Vnn]

And now an example on how to use it (click to launch then right-click to see the code):

AutosizeTextArea Example

Degrafa CSSButtonSkin Example (click to Launch)

Note that the “child skin” (upSkin for example) inherits its parent’s styles, so there’s no need to re-declare them.

Now that was easy, wasn’t it?

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)
Loading ... Loading ...