2019-05-03 12:48:59 +00:00
|
|
|
sub init()
|
|
|
|
m.name = m.top.findNode("label")
|
|
|
|
m.value = m.top.findNode("value")
|
|
|
|
|
2020-01-04 21:37:06 +00:00
|
|
|
m.name.width = 240
|
|
|
|
m.name.height = 75
|
2019-05-03 12:48:59 +00:00
|
|
|
|
|
|
|
m.name.vertAlign = "center"
|
|
|
|
m.name.horizAlign = "center"
|
|
|
|
|
2020-05-05 21:09:18 +00:00
|
|
|
m.value.hintText = tr("Enter a value...")
|
2020-01-04 21:37:06 +00:00
|
|
|
m.value.maxTextLength = 120
|
2019-05-03 12:48:59 +00:00
|
|
|
end sub
|
|
|
|
|
|
|
|
sub itemContentChanged()
|
|
|
|
data = m.top.itemContent
|
|
|
|
|
|
|
|
m.name.text = data.label
|
|
|
|
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"
|
|
|
|
else
|
|
|
|
color = "#ffffffFF"
|
|
|
|
end if
|
|
|
|
|
|
|
|
m.name.color = color
|
|
|
|
m.value.textColor = color
|
|
|
|
|
2020-01-04 21:37:06 +00:00
|
|
|
end sub
|