Shane
Shane

Reputation: 4983

How do you change border line color of wx.StaticBox?

enter image description here

As you can see from the above pic, the border line of wx.StaticBox is always grey on windows, is it possible to change it? I've searched quite a bit, but there doesn't seem to be any properties/attributes for the border line color, so how do you do it?

Thanks a lot

Upvotes: 4

Views: 4937

Answers (2)

Faisal Anees
Faisal Anees

Reputation: 9

This is how you would do it

pnl = wx.Panel()

bx1 = wx.StaticBox(pnl, label='Wave 1', pos=(5, 10), size=(300, 500))

bx1.SetBackgroundColour((0, 0, 0))

Upvotes: 1

Mind Mixer
Mind Mixer

Reputation: 1583

This question had discussed in wxPython google group. "wx doesn't provide that level of control over the borders of widgets." Robin Dunn. You can try to create new class inherit it from wx.StaticBox and implement OnPaint method

Upvotes: 2

Related Questions