so I have something like...
canvasItems = [
{
Text:"This is ImageCanvas 1"
TextAttrs:{Color:"#FFFFFFFF", Font:"Medium",
HAlign:"HCenter", VAlign:"VCenter",
Direction:"LeftToRight"}
TargetRect:{x:390,y:357,w:500,h:60}
},
{
Text:"This is ImageCanvas 2"
TextAttrs:{Color:"#FFFFFFFF", Font:"Medium",
HAlign:"HCenter", VAlign:"VCenter",
Direction:"LeftToRight"}
TargetRect:{x:390,y:357,w:500,h:60}
},
{
Text:"This is ImageCanvas 3"
TextAttrs:{Color:"#FFFFFFFF", Font:"Medium",
HAlign:"HCenter", VAlign:"VCenter",
Direction:"LeftToRight"}
TargetRect:{x:390,y:357,w:500,h:60}
}
]
I've previously been changing the text color by a roByteArray conversion
fadelevel = CreateObject("roByteArray")
fadelevel.fromhexstring(device.nextoverlayfontcolor)
fadelevel[0] = fadelevel[0] - 8 ' or whatever values.
canvasitems = [
Text:"This is ImageCanvas 3"
TextAttrs:{Color:"#" + fadelevel.tohexstring(), Font:"Medium",
HAlign:"HCenter", VAlign:"VCenter",
Direction:"LeftToRight"}
TargetRect:{x:390,y:357,w:500,h:60}
]
canvas.SetLayer(0, {Color:"#FF000000", CompositionMode:"Source"})
canvas.SetLayer(1, canvasItems)
canvas.Show()
And that worked fine for one canvas Item. My question is how do I roll thru an array of canvas items and change a value in all the TextAttrs nested Arrays?