Aligning object in StaticBox

L. Fanchi wrote:

Hello,

I'd like to align the contents of a StaticBox (an image preview) to the center. I'm trying to figure out sizers, but I'm not having a lot of luck.
How can I center the image in the StaticBox?

I whipped out an example in XRC, attached. This probably uses more sizers than is needed, but it works. It shouldn't be too hard to translate it to Python code.

center.xrc (1.27 KB)

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!