2018-03-29, 03:08
2018-03-29, 17:47
(2018-03-29, 07:35)Hitcher Wrote:Using this method, widgets are always displayed. Is there a way to check if the user selected any type of content for widget 1, if content is selected, then enable widget 2.code:Control.IsVisible(ID_OF_PREVIOUS_CONTROL)
Here is the code for widget 1:
code :
<control type="button" id="3100">
<description>Browse for background</description>
<width>1256</width>
<include>DefaultSettingButton</include>
<label>Widget 1</label>
<label2>$INFO[Container(211).ListItem.Property(widgetName.personalposter1)]</label2>
<onclick>ClearProperty(WidgetVisibility,home)</onclick>
<onclick>SetProperty(widgetID, personalposter1)</onclick>
<onclick>SendClick(312)</onclick>
<visible>String.IsEqual(Window.Property(groupname),mainmenu)</visible>
</control>
So, I want widget 2 to be visible only if there's content in widget 1. I tried the following in widget 2 so that if widget 1 has information, widget 2 is enabled. Unfortunately, it did not work. What are my doing wroing?
code:<enable>$INFO[Container(211).ListItem.Property(widgetName.personalposter1)]</enable>
code:<control type="button" id="3101">
<description>Browse for background</description>
<width>1256</width>
<include>DefaultSettingButton</include>
<label>Widget 2</label>
<label2>$INFO[Container(211).ListItem.Property(widgetName.personalposter2)]</label2>
<onclick>ClearProperty(WidgetVisibility,home)</onclick>
<onclick>SetProperty(widgetID, personalposter2)</onclick>
<onclick>SendClick(312)</onclick>
<visible>String.IsEqual(Window.Property(groupname),mainmenu</visible>
<enable>$INFO[Container(211).ListItem.Property(widgetName.personalposter1)]</enable>
</control>
2018-03-29, 19:36
There's no condition in that code.
code:<enable>!String.IsEmpty(Container(211).ListItem.Property(widgetName.personalposter1))</enable>
2018-03-29, 20:54