2019-03-14 17:11:51 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
<component name="ConfigItem" extends="Group">
|
|
|
|
<children>
|
2019-03-20 03:23:58 +00:00
|
|
|
<LayoutGroup layoutDirection="horiz" >
|
|
|
|
<Label id="label" />
|
|
|
|
<TextEditBox id="value" />
|
2019-03-14 17:11:51 +00:00
|
|
|
</LayoutGroup>
|
|
|
|
</children>
|
|
|
|
|
|
|
|
<interface>
|
|
|
|
<field id="itemContent" type="node" onChange="itemContentChanged" />
|
2019-03-20 03:23:58 +00:00
|
|
|
<field id="itemHasFocus" type="boolean" onChange="setColors" />
|
2019-03-14 17:11:51 +00:00
|
|
|
</interface>
|
|
|
|
|
|
|
|
<script type="text/brightscript">
|
|
|
|
<![CDATA[
|
2019-03-20 03:23:58 +00:00
|
|
|
sub init()
|
2019-03-14 17:11:51 +00:00
|
|
|
m.name = m.top.findNode("label")
|
|
|
|
m.value = m.top.findNode("value")
|
2019-03-20 03:23:58 +00:00
|
|
|
|
|
|
|
m.top.layoutDirection = "horiz"
|
|
|
|
m.top.vertAlignment = "top"
|
|
|
|
|
|
|
|
m.name.width = 250
|
|
|
|
m.name.height = 80
|
|
|
|
|
|
|
|
m.name.vertAlign = "center"
|
|
|
|
m.name.horizAlign = "center"
|
|
|
|
|
|
|
|
' TODO - calculate "width" better... this is total item - (label + spacings)
|
|
|
|
m.value.width = 1000 - 230
|
|
|
|
m.value.height = 80
|
|
|
|
|
|
|
|
m.value.hintText = "Enter a value..."
|
|
|
|
m.value.maxTextLength = 100
|
2019-03-14 17:11:51 +00:00
|
|
|
end sub
|
|
|
|
|
2019-03-20 03:23:58 +00:00
|
|
|
sub itemContentChanged()
|
2019-03-14 17:11:51 +00:00
|
|
|
data = m.top.itemContent
|
|
|
|
|
|
|
|
m.name.text = data.label
|
2019-03-20 03:23:58 +00:00
|
|
|
if data.type = "password"
|
|
|
|
m.value.secureMode = true
|
|
|
|
end if
|
|
|
|
|
|
|
|
m.value.text = data.value
|
|
|
|
end sub
|
|
|
|
|
|
|
|
sub setColors()
|
|
|
|
if m.top.itemHasFocus
|
|
|
|
color = "#101010FF"
|
2019-03-14 17:11:51 +00:00
|
|
|
else
|
2019-03-20 03:23:58 +00:00
|
|
|
color = "#ffffffFF"
|
2019-03-14 17:11:51 +00:00
|
|
|
end if
|
2019-03-20 03:23:58 +00:00
|
|
|
|
|
|
|
m.name.color = color
|
|
|
|
m.value.textColor = color
|
|
|
|
|
2019-03-14 17:11:51 +00:00
|
|
|
end sub
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</component>
|