Hi Chester,
Could you please bottom post, as reading first
the answer and
then having to look for the question is getting very quickly confusing.
Chester wrote:
Andrea, I've tried import wx; wx.CENTER on the Windows version of wxPython 2.8.7.1 <http://2.8.7.1> Unicode and it doesn't exist, i.e. it spits '0'.
That would surprise me, I get:
# Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
# wxPython 2.8.4.0, Boa Constructor 0.6.1
# Type "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.Center
6
>>> wx.Centre
6
>>> wx.CENTRE
1
>>> wx.CENTER
1
>>> wx.CENTER_ON_PARENT
File "<console>", line 1, in <module>
''' <type 'exceptions.AttributeError'> : 'module' object has no attribute 'CENTER_ON_PARENT' '''
>>> wx.CENTRE_ON_PARENT
File "<console>", line 1, in <module>
''' <type 'exceptions.AttributeError'> : 'module' object has no attribute 'CENTRE_ON_PARENT' '''
I wasn't trying this with the latest trunk. As far as I know that this is included now, I am looking forward to the new wxPython release. 
BTW, do you have any idea how can i test whether wx.CENTER_ON_PARENT (besides wx.CENTRE_ON_PARENT) exists as well?
I use Boa so, I do Ctrl-h enter 'center' and press enter, this brings up the help and shows entries which relate to my search string (in English or English by the way
).
Here is what I found, i.e. what you are looking for is not a style flag, but they are methods of the wx.Windows class.
Center(self, direction=BOTH)
Centers the window. The parameter specifies the direction for cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may also include wx.CENTER_ON_SCREEN flag if you want to center the window on the entire screen and not on its parent window. If it is a top-level window and has no parent then it will always be centered relative to the screen.
Parameters:
direction
(type=int)
CenterOnParent(self, dir=BOTH)
Center with respect to the the parent window
Parameters:
dir
(type=int)
Centre(self, direction=BOTH)
Centers the window. The parameter specifies the direction for cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may also include wx.CENTER_ON_SCREEN flag if you want to center the window on the entire screen and not on its parent window. If it is a top-level window and has no parent then it will always be centered relative to the screen.
Parameters:
direction
(type=int)
CentreOnParent(self, dir=BOTH)
Center with respect to the the parent window
Parameters:
dir
(type=int)
Werner