Sizer Constraints...

Hello Andrea,

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.

[snip]

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

Does anyone have some suggestions?

In your sample, setting proportions when adding the filename and rightsizer

seems to do the trick.

E.g. change

sizer.Add(self.filename, 0, wx.LEFT|wx.ALIGN_CENTER, 10)
...
sizer.Add(rightsizer, 0, wx.ALIGN_CENTER)

to

sizer.Add(self.filename, 3, wx.LEFT|wx.ALIGN_CENTER, 10)
...
sizer.Add(rightsizer, 3, wx.ALIGN_CENTER)

Brian

CONFIDENTIAL AND PRIVILEGED INFORMATION NOTICE

This e-mail, and any attachments, may contain information that

is confidential, subject to copyright, or exempt from disclosure.

Any unauthorized review, disclosure, retransmission,

dissemination or other use of or reliance on this information

may be unlawful and is strictly prohibited.

AVIS D’INFORMATION CONFIDENTIELLE ET PRIVILÉGIÉE

Le présent courriel, et toute pièce jointe, peut contenir de

l’information qui est confidentielle, régie par les droits

d’auteur, ou interdite de divulgation. Tout examen,

divulgation, retransmission, diffusion ou autres utilisations

non autorisées de l’information ou dépendance non autorisée

envers celle-ci peut être illégale et est strictement interdite.