Eto set border of control

Does anybody know how to set the background color of a panel using Python Eto?

There is no property BackgroundColor for an Eto.Forms.Panel, but as I understand a panel is ultimately an Eto.Forms.Control, which does have this property.

Unfortunately this does not work:

panel = Eto.Forms.Panel()
panel.BackgroundColor = Eto.Drawing.Colors.Blue

How would I go about this?

Maybe because Panel is meant to be inherited in most cases…
So a StackLayout is inherited from Panel and it seems to work fine. In practice wouldn’t you use the variety of layout classes rather than the base Panel?

colorchange

1 Like

Sorry for not replying before, but I’ve not worked on this project for some time as you can see…
Thanks, this was what I was looking for!