When I instantiate a Pane, I use backgroundColor
var pane = new Pane({
width: 200,
height: 100,
backgroundColor: "#ff0000",
}).reg(CENTER);
But later if I want to use the same pane with a different color I can't use
pane.backgroundColor
but I have to use
pane.backing.color
This is not intuitive !
I should be able to use
pane.backgroundColor
1 Like
In an ideal world, perhaps. We do it case-by-case which we realize is not consistent, but saves size in the ZIM code. There are many cases where there a property is not available that matches a parameter. If the solution can come from accessing a ZIM object inside the component, like in the Pane() example, we then let coders figure that out.
We do take requests for missing properties. And then look at how often someone would change the color of the Pane, etc. All this is open for discussion too... so will leave the message active if anyone else wants to join in.
We will give the backgroundColor of the Pane some thought.
2 Likes
Or may be some way to make it easier to figure out such properties in the help doc.
Yes - in the parameter information we can say to change this afterwards, use the background property. Etc. If you look at properties, it will say there is access to the backing property... we can add it there too. Thanks.
This has been adjusted for ZIM Pane()
We will keep an eye out for other similar opportunities.