9/9/2010 1:39:18 AM
Title:
Skinning problem
Hi all..
I'm trying to write a skin for a titlewindow. i'm writing a path instead of border rectange in the skin. Now i'm struggling to set the path value dynamically from the hostComponent which is the titlewindow
if i hardcode the path it works perfectly. but i want it to be dynamic
Thanks!
9/9/2010 4:52:44 AM
check these links to apply run-time skins on components in flex
http://blogs.adobe.com/kiwi/2006/07/loading_flex_skins_at_runtime.html
http://ted.onflash.org/2007/01/flex-201-understand-runtime-css.php
9/9/2010 5:20:28 AM
Hi warrior..
I think i was not clear with the question. I'm not asking for loading skins at runtime.
for eg: say there is a titlewindow.mxml for which there is a skin called titlewindowskin.mxml.
instead of border rectangle, i'm drawing a path of some shape using data property for path..
now i want the path property to be set by the titlewindow.mxml instead of hardcoding a string in the skin. the reason is i want to use the same sking for more titlewindows but with different paths alone.
can u help out??
an example would be better or even approach is fine!!
thanks!
9/9/2010 9:03:50 AM
To set the path dynamically in your skin mxml you should be able to pass a parameter to the skin mxml which tells which path to use. I don't see it an easy approach. I think you may use a global variable which is being accessed in the skin mxml. Before setting any skin update the variable first with the new path string and then apply skin. The skin will pic the path from global variable.