Sizer Constraints...

Hello NG,

I am becoming crazy in doing something that seemed very simple at the beginning. Probably today is not the right day for coding :-)

I have a simple panel, in which horizontal sizer I put (in this order):

(1) wx.StaticText (2) wx.Button (3) A Composite Control

The composite control is just a sizer that contains a wx.Slider, 2 wx.StaticBitmap and a wx.StaticText. What I would like to achieve is just keeping the wx.Button exactly in the center (horizontally) of the panel, however the panel is resized. I have tried to add stretchable spacer between (1), (2) and (2), (3), but the button is always shifted towards the left (probably because the length of (3) is greater than the length of (1)).

I attach a similar sample that shows what I don’t want to achieve :wink:

Does anyone have some suggestions?

Thank you very much.

Andrea.

prova.py (1.49 KB)

···

Andrea Gavana
(gavana@kpo.kz)

Reservoir Engineer

KPDL

4, Millbank

SW1P 3JA London

Direct Tel: +44 (0) 20 717 08936

Mobile Tel: +44 (0) 77 487 70534

Fax: +44 (0) 20 717 08900

Web:
http://xoomer.virgilio.it/infinity77

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯