jf-roku/components/ConfigurationItem.xml

52 lines
1.1 KiB
XML
Raw Normal View History

2019-02-27 04:36:12 +00:00
<?xml version="1.0" encoding="utf-8" ?>
<component name="ConfigItem" extends="Group">
<children>
<LayoutGroup
layoutDirection="horiz"
vertAlignment="center"
itemSpacings="20"
translation="[8,40]" >
<Label id="label"
horizAlign="left"
width="196"
height="60"
color="#666666" />
<Label id="value"
horizAlign="left"
width="196"
height="60"
color="#666666" />
2019-02-27 04:36:12 +00:00
</LayoutGroup>
</children>
<interface>
<field id="itemContent" type="node" onChange="itemContentChanged" />
</interface>
<script type="text/brightscript">
2019-03-05 05:18:01 +00:00
<![CDATA[
sub Init()
m.name = m.top.findNode("label")
m.value = m.top.findNode("value")
2019-03-05 05:18:01 +00:00
end sub
2019-02-27 04:36:12 +00:00
2019-03-05 05:18:01 +00:00
sub itemContentChanged() as void
data = m.top.itemContent
m.name.text = data.label
if data.value = ""
m.value.color = "#444444"
m.value.text = "Enter a value..."
else if data.type = "password"
m.value.color = "#ffffff"
m.value.text = "********"
2019-03-05 05:18:01 +00:00
else
m.value.color = "#ffffff"
m.value.text = data.value
2019-03-05 05:18:01 +00:00
end if
end sub
]]>
2019-02-27 04:36:12 +00:00
</script>
</component>