java picture style setting

2 messages - 483 views

Hi

I'm using this code line to set the style of an image that is loaded dynamically

((Picture)screen.getWidget("P2")).setSource("urhere.png").parseAuthorStyle("padding:120 0 0 0");

The picture is correctly loaded and displayed, but the style setting does not work

what am I doing wrong?

Thanks

Lee

If anyone is interested the solution was to add :

      screen.clearCachedStyle(true);

after setting the image source and any of the styles.

Lee