2016-02-10, 16:36
(2016-02-07, 00:21)BobCratchett Wrote: Possible? Yes. Easy? Well...
The individual items in the widget don't have an <onfocus /> tag. The container that they're in does, but that only gets called when the whole widget gets focused, not when the focus changes between the items in the widget.
The only workaround I know of (which isn't to say there aren't others known by those more skilled than I, or necessarily that this workaround will in fact work for you) is to put a button control into the <focusedlayout /> of the panel container, and use its <onfocus /> to run the script.
That means heading back to the Includes_Widgets.xml file, and adding a button control to every <focusedlayout /> in there (there's a few as they have to cover all the different widget layouts/artwork styles - and it's probably a good place to use an include so you're only editing the button control in one place) with the conditional <onfocus />. Then cross your fingers that it works!
I wish you luck
@BobCratchett
okay I've decided to make it in the easier way by using <oninfo> to run the script...
so I dublicate the custom_1199_WidgetInfo.xml to a new custom_1198_WidgetInfoTVHighLights.xml
i aktivate the ne Window as follow:
Code:
<oninfo condition ="!StringCompare(Container(9000).ListItem.Property(widgetType),tvhighlights)">ActivateWindow(1199)</oninfo>
<oninfo condition ="StringCompare(Container(9000).ListItem.Property(widgetType),tvhighlights)">ActivateWindow(1198)</oninfo>
that works fine... but now I tried set a property for the new window as follow
Code:
<oninfo>SetProperty(Widget.Extrainfos,$INFO[Container(8001).ListItem.Property(TVHighlightsToday.Extrainfos)],home)</oninfo>
do you have a idea?