Page 1 of 1

Attaching scripts to widgets

Posted: 23 Aug 2014 10:26
by Maxxy
For example I have a flow that covers stupid battery icon with a widget overflow of a battery percentage, that is far more useful than a filling up battery picture. That place is pretty crowded and the percentage should be as big as possible. So if percentage changes to 100 I can't see full 100 (since its more than 2 digits). A cut off 1 and a cut off last zero is what I see. It would be cool if for example I could say: when certain variable is eaqual to certain value then change text width... Or maybe change text to a green battery image. So im talking about adding script flexability to all of the parts of the custom widgets.

Re: Attaching scripts to widgets

Posted: 23 Aug 2014 15:12
by Martin
A custom widget can be modified using the script function setWidgetElementProperty from within a flow.

The custom widget tutorial mentions this capability at the bottom of the page in the section Tips:
Creating a Custom Widget