wx.ALIGN_CENTER_VERTICAL?

Hi All,

I'm having some difficulties understanding wx.ALIGN_CENTER_VERTICAL.
I'm trying to get text to center horizontally (this works well with
wx.ALIGN_CENTER) and vertically in a box with a wx.SIMPLE_BORDER. I
can't seem to get the vertical-centering part to work.

Here's my sample code:

===SAMPLE BELOW===
#!/usr/bin/env python
import wx

class MainApp(wx.App):
  def OnInit(self):

    self.frame = wx.Frame(None, wx.ID_ANY, size=((400,400)))
    self.vbox = wx.BoxSizer(wx.VERTICAL)

    self.textItem = wx.StaticText(parent=self.frame, label="THIS IS A
LABEL.", size=((200,50)), pos=((100,100)), style=wx.ALIGN_CENTER|
wx.SIMPLE_BORDER)
    self.textItem.SetBackgroundColour(wx.WHITE)
    self.textItem.SetForegroundColour(wx.BLACK)

    self.vbox.Add(item=self.textItem, flag=wx.ALIGN_CENTER_VERTICAL)

    self.frame.SetSizer(self.vbox)

    self.frame.Show()
    self.frame.Refresh()
    return True

if __name__ == '__main__':
  app = MainApp(False)
  import wx.lib.inspection
  wx.lib.inspection.InspectionTool().Show()
  app.MainLoop()

===SAMPLE ABOVE===

When I use the inspection tool (I learned from last time! :slight_smile: ) I can
see that the flag wx.ALIGN_CENTER_VERTICAL is applied to the Static
Text item as a Sizer Item, but it does not align in the center
vertically - only horizontally.

(To be clear, I am trying to get the text to center both horizontally
and vertically in the box. That the positioning of the box doesn't
seem to work is ok for this. (That is, unless that's part of the
problem.))

What (likely very obvious?) thing am I missing?

Thanks in advance!

Nest the Vertical sizer in a horizontal sizer. As I recall, they
center in reverse (i.e. vertical centers horizontally and vice-versa).

···

On Dec 21, 2:30 pm, tdahsu <tda...@gmail.com> wrote:

Hi All,

I'm having some difficulties understanding wx.ALIGN_CENTER_VERTICAL.
I'm trying to get text to center horizontally (this works well with
wx.ALIGN_CENTER) and vertically in a box with a wx.SIMPLE_BORDER. I
can't seem to get the vertical-centering part to work.

Here's my sample code:

===SAMPLE BELOW===
#!/usr/bin/env python
import wx

class MainApp(wx.App):
def OnInit(self):

            self\.frame = wx\.Frame\(None, wx\.ID\_ANY, size=\(\(400,400\)\)\)
            self\.vbox = wx\.BoxSizer\(wx\.VERTICAL\)

            self\.textItem = wx\.StaticText\(parent=self\.frame, label=&quot;THIS IS A

LABEL.", size=((200,50)), pos=((100,100)), style=wx.ALIGN_CENTER|
wx.SIMPLE_BORDER)
self.textItem.SetBackgroundColour(wx.WHITE)
self.textItem.SetForegroundColour(wx.BLACK)

            self\.vbox\.Add\(item=self\.textItem, flag=wx\.ALIGN\_CENTER\_VERTICAL\)

            self\.frame\.SetSizer\(self\.vbox\)

            self\.frame\.Show\(\)
            self\.frame\.Refresh\(\)
            return True

if __name__ == '__main__':
app = MainApp(False)
import wx.lib.inspection
wx.lib.inspection.InspectionTool().Show()
app.MainLoop()

===SAMPLE ABOVE===

When I use the inspection tool (I learned from last time! :slight_smile: ) I can
see that the flag wx.ALIGN_CENTER_VERTICAL is applied to the Static
Text item as a Sizer Item, but it does not align in the center
vertically - only horizontally.

(To be clear, I am trying to get the text to center both horizontally
and vertically in the box. That the positioning of the box doesn't
seem to work is ok for this. (That is, unless that's part of the
problem.))

What (likely very obvious?) thing am I missing?

Thanks in advance!

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

Is that as simple as:

self.hbox = wx.BoxSizer(wx.HORIZONTAL)
self.hbox.Add(self.vbox)

for the main sizer?

I have many of these static text items that are created from iterating
through a dictionary - there are boxes that go down in a list:

H1...
1. ...
2. ...

H2...
1. ...
2. ...

Does each one have to be nested?

Thanks.

···

On Dec 21, 4:50 pm, Mike Driscoll <kyoso...@gmail.com> wrote:

On Dec 21, 2:30 pm, tdahsu <tda...@gmail.com> wrote:
> I'm having some difficulties understanding wx.ALIGN_CENTER_VERTICAL.
> I'm trying to get text to center horizontally (this works well with
> wx.ALIGN_CENTER) and vertically in a box with a wx.SIMPLE_BORDER. I
> can't seem to get the vertical-centering part to work.

> Here's my sample code:
> ===SAMPLE BELOW===
> #!/usr/bin/env python
> import wx

> class MainApp(wx.App):
> def OnInit(self):
> self.frame = wx.Frame(None, wx.ID_ANY, size=((400,400)))
> self.vbox = wx.BoxSizer(wx.VERTICAL)
> self.textItem = wx.StaticText(parent=self.frame, label="THIS IS A
> LABEL.", size=((200,50)), pos=((100,100)), style=wx.ALIGN_CENTER|
> wx.SIMPLE_BORDER)
> self.textItem.SetBackgroundColour(wx.WHITE)
> self.textItem.SetForegroundColour(wx.BLACK)
> self.vbox.Add(item=self.textItem, flag=wx.ALIGN_CENTER_VERTICAL)
> self.frame.SetSizer(self.vbox)
> self.frame.Show()
> self.frame.Refresh()
> return True

> if __name__ == '__main__':
> app = MainApp(False)
> import wx.lib.inspection
> wx.lib.inspection.InspectionTool().Show()
> app.MainLoop()

> ===SAMPLE ABOVE===

> When I use the inspection tool (I learned from last time! :slight_smile: ) I can
> see that the flag wx.ALIGN_CENTER_VERTICAL is applied to the Static
> Text item as a Sizer Item, but it does not align in the center
> vertically - only horizontally.

> (To be clear, I am trying to get the text to center both horizontally
> and vertically in the box. That the positioning of the box doesn't
> seem to work is ok for this. (That is, unless that's part of the
> problem.))

> What (likely very obvious?) thing am I missing?

> Thanks in advance!

Nest the Vertical sizer in a horizontal sizer. As I recall, they
center in reverse (i.e. vertical centers horizontally and vice-versa).

-------------------
Mike Driscoll
Blog: http://blog.pythonlibrary.org

Sort of. If you are just creating a column of these, then stick ALL of
them in a Vertically oriented BoxSizer and nest that in a Horizontal
one.

···

On Dec 21, 7:12 pm, tdahsu <tda...@gmail.com> wrote:

On Dec 21, 4:50 pm, Mike Driscoll <kyoso...@gmail.com> wrote:

> On Dec 21, 2:30 pm, tdahsu <tda...@gmail.com> wrote:
> > I'm having some difficulties understanding wx.ALIGN_CENTER_VERTICAL.
> > I'm trying to get text to center horizontally (this works well with
> > wx.ALIGN_CENTER) and vertically in a box with a wx.SIMPLE_BORDER. I
> > can't seem to get the vertical-centering part to work.

> > Here's my sample code:
> > ===SAMPLE BELOW===
> > #!/usr/bin/env python
> > import wx

> > class MainApp(wx.App):
> > def OnInit(self):
> > self.frame = wx.Frame(None, wx.ID_ANY, size=((400,400)))
> > self.vbox = wx.BoxSizer(wx.VERTICAL)
> > self.textItem = wx.StaticText(parent=self.frame, label="THIS IS A
> > LABEL.", size=((200,50)), pos=((100,100)), style=wx.ALIGN_CENTER|
> > wx.SIMPLE_BORDER)
> > self.textItem.SetBackgroundColour(wx.WHITE)
> > self.textItem.SetForegroundColour(wx.BLACK)
> > self.vbox.Add(item=self.textItem, flag=wx.ALIGN_CENTER_VERTICAL)
> > self.frame.SetSizer(self.vbox)
> > self.frame.Show()
> > self.frame.Refresh()
> > return True

> > if __name__ == '__main__':
> > app = MainApp(False)
> > import wx.lib.inspection
> > wx.lib.inspection.InspectionTool().Show()
> > app.MainLoop()

> > ===SAMPLE ABOVE===

> > When I use the inspection tool (I learned from last time! :slight_smile: ) I can
> > see that the flag wx.ALIGN_CENTER_VERTICAL is applied to the Static
> > Text item as a Sizer Item, but it does not align in the center
> > vertically - only horizontally.

> > (To be clear, I am trying to get the text to center both horizontally
> > and vertically in the box. That the positioning of the box doesn't
> > seem to work is ok for this. (That is, unless that's part of the
> > problem.))

> > What (likely very obvious?) thing am I missing?

> > Thanks in advance!

> Nest the Vertical sizer in a horizontal sizer. As I recall, they
> center in reverse (i.e. vertical centers horizontally and vice-versa).

> -------------------
> Mike Driscoll
> Blog: http://blog.pythonlibrary.org

Is that as simple as:

self.hbox = wx.BoxSizer(wx.HORIZONTAL)
self.hbox.Add(self.vbox)

for the main sizer?

I have many of these static text items that are created from iterating
through a dictionary - there are boxes that go down in a list:

H1...
1. ...
2. ...

H2...
1. ...
2. ...

Does each one have to be nested?

Thanks.

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

Ok, if I do this:

=====SAMPLE=====
#!/usr/bin/env python
import wx

class MainApp(wx.App):
  def OnInit(self):

    self.frame = wx.Frame(None, wx.ID_ANY, size=((400,400)))
    self.hbox = wx.BoxSizer(wx.HORIZONTAL)
    self.vbox = wx.BoxSizer(wx.VERTICAL)

    self.textItem = wx.StaticText(parent=self.frame, label="THIS IS A
LABEL.", size=((200,50)), pos=((100,100)), style=wx.ALIGN_CENTER|
wx.SIMPLE_BORDER)
    self.textItem.SetBackgroundColour(wx.WHITE)
    self.textItem.SetForegroundColour(wx.BLACK)

    self.hbox.Add(item=self.textItem, flag=wx.ALIGN_CENTER_VERTICAL)
    self.vbox.Add(self.hbox)

    #self.vbox.Add(item=self.textItem, flag=wx.ALIGN_CENTER_VERTICAL)
    #self.hbox.Add(self.vbox)

    self.frame.SetSizer(self.hbox)
    #self.frame.SetSizer(self.vbox)

    self.frame.Show()
    self.frame.Refresh()
    return True

if __name__ == '__main__':
  app = MainApp(False)
  import wx.lib.inspection
  wx.lib.inspection.InspectionTool().Show()
  app.MainLoop()
=====SAMPLE=====

it centers the BOX vertically in the window, but not the text in the
box. I need to center the TEXT in the box. Attaching
"wx.ALIGN_CENTER_VERTICAL" to the wx.StaticText item doesn't do
anything.

Am I missing something? Should I try to position the text in such a
way that it figures out its own pixel length and then the size of the
box and does the appropriate math?

Thanks in advance!

···

On Dec 22, 10:18 am, Mike Driscoll <kyoso...@gmail.com> wrote:

On Dec 21, 7:12 pm, tdahsu <tda...@gmail.com> wrote:
> On Dec 21, 4:50 pm, Mike Driscoll <kyoso...@gmail.com> wrote:

> > On Dec 21, 2:30 pm, tdahsu <tda...@gmail.com> wrote:
> > > I'm having some difficulties understanding wx.ALIGN_CENTER_VERTICAL.
> > > I'm trying to get text to center horizontally (this works well with
> > > wx.ALIGN_CENTER) and vertically in a box with a wx.SIMPLE_BORDER. I
> > > can't seem to get the vertical-centering part to work.

> > > Here's my sample code:
> > > ===SAMPLE BELOW===
> > > #!/usr/bin/env python
> > > import wx

> > > class MainApp(wx.App):
> > > def OnInit(self):
> > > self.frame = wx.Frame(None, wx.ID_ANY, size=((400,400)))
> > > self.vbox = wx.BoxSizer(wx.VERTICAL)
> > > self.textItem = wx.StaticText(parent=self.frame, label="THIS IS A
> > > LABEL.", size=((200,50)), pos=((100,100)), style=wx.ALIGN_CENTER|
> > > wx.SIMPLE_BORDER)
> > > self.textItem.SetBackgroundColour(wx.WHITE)
> > > self.textItem.SetForegroundColour(wx.BLACK)
> > > self.vbox.Add(item=self.textItem, flag=wx.ALIGN_CENTER_VERTICAL)
> > > self.frame.SetSizer(self.vbox)
> > > self.frame.Show()
> > > self.frame.Refresh()
> > > return True

> > > if __name__ == '__main__':
> > > app = MainApp(False)
> > > import wx.lib.inspection
> > > wx.lib.inspection.InspectionTool().Show()
> > > app.MainLoop()

> > > ===SAMPLE ABOVE===

> > > When I use the inspection tool (I learned from last time! :slight_smile: ) I can
> > > see that the flag wx.ALIGN_CENTER_VERTICAL is applied to the Static
> > > Text item as a Sizer Item, but it does not align in the center
> > > vertically - only horizontally.

> > > (To be clear, I am trying to get the text to center both horizontally
> > > and vertically in the box. That the positioning of the box doesn't
> > > seem to work is ok for this. (That is, unless that's part of the
> > > problem.))

> > > What (likely very obvious?) thing am I missing?

> > > Thanks in advance!

> > Nest the Vertical sizer in a horizontal sizer. As I recall, they
> > center in reverse (i.e. vertical centers horizontally and vice-versa).

> > -------------------
> > Mike Driscoll
> > Blog: http://blog.pythonlibrary.org

> Is that as simple as:

> self.hbox = wx.BoxSizer(wx.HORIZONTAL)
> self.hbox.Add(self.vbox)

> for the main sizer?

> I have many of these static text items that are created from iterating
> through a dictionary - there are boxes that go down in a list:

> H1...
> 1. ...
> 2. ...

> H2...
> 1. ...
> 2. ...

> Does each one have to be nested?

> Thanks.

Sort of. If you are just creating a column of these, then stick ALL of
them in a Vertically oriented BoxSizer and nest that in a Horizontal
one.
-------------------
Mike Driscoll
Blog: http://blog.pythonlibrary.org

Try adding the wx.EXPAND flag when you add the item to the sizer,
otherwise the SizerItem will only take up the space it needs, not the
space available.

Josh

Josh English
Joshua.R.English@gmail.com
http://joshenglish.livejournal.com

Also, when working with sizers, use the inspection widget. Here's how I do this:

from wx.lib.mixins.inspection import InspectionMixin

class TestApp(wx.App, InspectionMixin):
        def OnInit(self):
            self.Init()
            mainFrame = TestFrame(None)
            self.SetTopWindow(mainFrame)
            mainFrame.Show()
            return 1

    app = TestApp(0)
    app.MainLoop()

Then, when the app is running, the default CTRL-ALT-I brings up the
inspector. You can hightlight boxes and sizers and see what wxPython
is doing in your layout.

Josh

···

On Wed, Dec 22, 2010 at 10:17 PM, Josh English <joshua.r.english@gmail.com> wrote:

Try adding the wx.EXPAND flag when you add the item to the sizer,
otherwise the SizerItem will only take up the space it needs, not the
space available.

Josh

Josh English
Joshua.R.English@gmail.com
http://joshenglish.livejournal.com

--
Josh English
Joshua.R.English@gmail.com

DEPRECATED SIZER FLAGS:

wx.ALIGN_CENTER_VERTICAL
wx.ALIGN_CENTER_HORIZONTAL

There is no documentation for these flags anymore.

Use wx.ALIGN_CENTER, wx.CENTER, wx.ALIGN_CENTRE or wx.CENTRE

All 4 flags are synonyms for each other. They align the control along
the sizer's minor axis. That is, the opposite axis to the sizer's
declared (major) axis.

Ray Pasco

···

On Dec 23, 1:19 am, Josh English <joshua.r.engl...@gmail.com> wrote:

Also, when working with sizers, use the inspection widget. Here's how I do this:

from wx.lib.mixins.inspection import InspectionMixin

class TestApp(wx.App, InspectionMixin):
def OnInit(self):
self.Init()
mainFrame = TestFrame(None)
self.SetTopWindow(mainFrame)
mainFrame.Show()
return 1

app = TestApp\(0\)
app\.MainLoop\(\)

Then, when the app is running, the default CTRL-ALT-I brings up the
inspector. You can hightlight boxes and sizers and see what wxPython
is doing in your layout.

Josh
On Wed, Dec 22, 2010 at 10:17 PM, Josh English > > <joshua.r.engl...@gmail.com> wrote:
> Try adding the wx.EXPAND flag when you add the item to the sizer,
> otherwise the SizerItem will only take up the space it needs, not the
> space available.

> Josh

> Josh English
> Joshua.R.Engl...@gmail.com
>http://joshenglish.livejournal.com

--
Josh English
Joshua.R.Engl...@gmail.comhttp://joshenglish.livejournal.com

DEPRECATED SIZER FLAGS:

wx.ALIGN_CENTER_VERTICAL
wx.ALIGN_CENTER_HORIZONTAL

What makes you think that?

There is no documentation for these flags anymore.

http://docs.wxwidgets.org/trunk/classwx_sizer.html
http://docs.wxwidgets.org/trunk/defs_8h.html#543dd017a172dc316253a8a1f351dde9

Use wx.ALIGN_CENTER, wx.CENTER, wx.ALIGN_CENTRE or wx.CENTRE

All 4 flags are synonyms for each other.

No, they aren't. They are two sets of aliases.

  >>> wx.ALIGN_CENTER, wx.CENTER, wx.ALIGN_CENTRE, wx.CENTRE
  (2304, 1, 2304, 1)

···

On 12/23/10 9:17 AM, WinCrazy wrote:
  >>>

--
Robin Dunn
Software Craftsman

box. I need to center the TEXT in the box. Attaching
“wx.ALIGN_CENTER_VERTICAL” to the wx.StaticText item doesn’t do

anything.

Am I missing something?

I’m not positive, but I think wx.ALIGN_CENTER_VERTICAL doesn’t do anything for a wx.StaticText. It is intended to be aligned either left, right, or center, but all horizontally.

Should I try to position the text in such a

way that it figures out its own pixel length and then the size of the

box and does the appropriate math?

I think the problem is that you are trying to use the staticText’s background region as, essentially, a panel–it doesn’t work that way. Instead, if you put a wx.StaticText in a panel with a horizontal sizer, you can center the whole staticText vertically, and use wx.ALIGN_CENTER to center it horizontally.

Che

> DEPRECATED SIZER FLAGS:

> wx.ALIGN_CENTER_VERTICAL
> wx.ALIGN_CENTER_HORIZONTAL

What makes you think that?

> There is no documentation for these flags anymore.

I got it reversed. There is no documentation for wx.CENTER/CENTRE.
They are listed but not explained. However, they seem to work
identically to wx.ALIGN_CENTER/CENTRE.

wx.ALIGN_CENTER_VERTICAL and wx.ALIGN_CENTER_HORIZONTAL are silently
ineffective when a BoxSizer is declared wx.VERTICAL or wx.HORIZONTAL,
respectively. However, wx.ALIGN_CENTER and also wx.CENTER always work
properly on a BoxSizer minor axis. Therefore, it is pointless to use
either wx.ALIGN_CENTER_x when all the other flags automatically affect
placement on the sizer's minor axis without having to specify which
axis that is.

http://docs.wxwidgets.org/trunk/classwx_sizer.htmlhttp://docs.wxwidgets.org/trunk/defs_8h.html#543dd017a172dc316253a8a1

> Use wx.ALIGN_CENTER, wx.CENTER, wx.ALIGN_CENTRE or wx.CENTRE

> All 4 flags are synonyms for each other.

No, they aren't. They are two sets of aliases.

>>> wx.ALIGN_CENTER, wx.CENTER, wx.ALIGN_CENTRE, wx.CENTRE
(2304, 1, 2304, 1)
>>>
--
Robin Dunn
Software Craftsmanhttp://wxPython.org

The flags may have been assigned different values, but their effect
seems to be exactly the same. Since they have no detailed description,
it's a moot point. wx.CENTER/CENTRE consistently works the same way
as wx.ALIGN_CENTRE/ER. There's probably a subtle difference, but
without proper documentation it looks like I'll never find just what
that is.

Ray Pasco

···

On Dec 23, 3:13 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 12/23/10 9:17 AM, WinCrazy wrote:

wx.ALIGN_CENTER_VERTICAL and wx.ALIGN_CENTER_HORIZONTAL are silently
ineffective when a BoxSizer is declared wx.VERTICAL or wx.HORIZONTAL,
respectively. However, wx.ALIGN_CENTER and also wx.CENTER always work
properly on a BoxSizer minor axis. Therefore, it is pointless to use
either wx.ALIGN_CENTER_x when all the other flags automatically affect
placement on the sizer's minor axis without having to specify which
axis that is.

Like usual, all the true answers are always in the source code.

wx.ALIGN_CENTER will also work for either box sizer orientation because it is defined as:

      wxALIGN_CENTER = (wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL),

Use wx.ALIGN_CENTER, wx.CENTER, wx.ALIGN_CENTRE or wx.CENTRE

All 4 flags are synonyms for each other.

No, they aren't. They are two sets of aliases.

   >>> wx.ALIGN_CENTER, wx.CENTER, wx.ALIGN_CENTRE, wx.CENTRE
   (2304, 1, 2304, 1)

The flags may have been assigned different values, but their effect
seems to be exactly the same. Since they have no detailed description,
it's a moot point. wx.CENTER/CENTRE consistently works the same way
as wx.ALIGN_CENTRE/ER. There's probably a subtle difference, but
without proper documentation it looks like I'll never find just what
that is.

I don't think that wx.CENTER was ever intended for use with sizers. It may have been a bug that it was used there, but it looks like it was left in the code when the bug was fixed, probably because there too many people incorrectly using it so it was left there to avoid breaking things. The following can be seen at: wxTrac has been migrated to GitHub Issues - wxWidgets

         // NB: wxCENTRE is used here only for backwards compatibility,
         // wxALIGN_CENTRE should be used in new code
         else if ( flag & (wxCENTER | (IsVertical() ? wxALIGN_CENTRE_HORIZONTAL
                                                    : wxALIGN_CENTRE_VERTICAL)) )

···

On 12/24/10 9:12 PM, WinCrazy wrote:

--
Robin Dunn
Software Craftsman

Thanks for the info digging. I can't imaging that the wxCENTRE
definition code will ever be removed. It's just too convenient!

Ray Pasco

···

On Dec 25, 4:26 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 12/24/10 9:12 PM, WinCrazy wrote:

> wx.ALIGN_CENTER_VERTICAL and wx.ALIGN_CENTER_HORIZONTAL are silently
> ineffective when a BoxSizer is declared wx.VERTICAL or wx.HORIZONTAL,
> respectively. However, wx.ALIGN_CENTER and also wx.CENTER always work
> properly on a BoxSizer minor axis. Therefore, it is pointless to use
> either wx.ALIGN_CENTER_x when all the other flags automatically affect
> placement on the sizer's minor axis without having to specify which
> axis that is.

Like usual, all the true answers are always in the source code.

wx.ALIGN_CENTER will also work for either box sizer orientation because
it is defined as:

  wxALIGN\_CENTER = \(wxALIGN\_CENTER\_HORIZONTAL |

wxALIGN_CENTER_VERTICAL),

>>> Use wx.ALIGN_CENTER, wx.CENTER, wx.ALIGN_CENTRE or wx.CENTRE

>>> All 4 flags are synonyms for each other.

>> No, they aren't. They are two sets of aliases.

>> >>> wx.ALIGN_CENTER, wx.CENTER, wx.ALIGN_CENTRE, wx.CENTRE
>> (2304, 1, 2304, 1)

> The flags may have been assigned different values, but their effect
> seems to be exactly the same. Since they have no detailed description,
> it's a moot point. wx.CENTER/CENTRE consistently works the same way
> as wx.ALIGN_CENTRE/ER. There's probably a subtle difference, but
> without proper documentation it looks like I'll never find just what
> that is.

I don't think that wx.CENTER was ever intended for use with sizers. It
may have been a bug that it was used there, but it looks like it was
left in the code when the bug was fixed, probably because there too many
people incorrectly using it so it was left there to avoid breaking
things. The following can be seen at:wxTrac has been migrated to GitHub Issues - wxWidgets

     // NB: wxCENTRE is used here only for backwards compatibility,
     //     wxALIGN\_CENTRE should be used in new code
     else if \( flag &amp; \(wxCENTER | \(IsVertical\(\) ?

wxALIGN_CENTRE_HORIZONTAL
:
wxALIGN_CENTRE_VERTICAL)) )

--
Robin Dunn
Software Craftsmanhttp://wxPython.org