trivial wx.Frame.Center(wx.Horizontal) prob?

If you are running Windows, you can see this by dragging your taskbar to to the top of the screen. It is a little tricky to grab and drag the taskbar.

And then run:

import wx

app = wx.PySimpleApp()

frame = wx.Frame(None, -1, 'Center')
frame.Show()
frame.Center(wx.HORIZONTAL)

app.MainLoop()

I'm one of those rare people on Windows that puts their task bar on _top_ of the screen (betcha didn't even know you could drag it up there, didya?)

The moveable taskbar is overlooked by quite a few commercial products. When I launch DreamWeaver, it defaults to the top of the screen. Dreamweaver doesn't allow for the fact the taskbar is there, so it goes _under_ the task bar.

Because the Dreamweaver's titlebar is under the taskbar, it is hard to grab with a mouse. I have to access the system menu using the keyboard to move the Dreamweaver window down.

I have seen this with Excel also. And now with wx.Frame.

Windows also permits positioning the taskbar along the sides of the screen. I wonder if a Frame could be forced under a taskbar on the side as well?

You might find that having the taskbar on top is closer to eye level and more natural.

···

-------------
Win2000 SP4
ActiveState Python 2.3.3
wxPython 2.5.1.5

Jim Peterson wrote:

If you are running Windows, you can see this by dragging your taskbar to to the top of the screen. It is a little tricky to grab and drag the taskbar.

And then run:

import wx

app = wx.PySimpleApp()

frame = wx.Frame(None, -1, 'Center')
frame.Show()
frame.Center(wx.HORIZONTAL)

app.MainLoop()

Please enter a bug report about this. There is a function that can be used to get the usable rectangle of the screen that excludes any appbars, so it should be simple to update Cetner() to take advantage of that.

I'm one of those rare people on Windows that puts their task bar on _top_ of the screen (betcha didn't even know you could drag it up there, didya?)

I do it too. In fact, on Linux I have one on the top and another one on the bottom of the screen. The top is all quick-launch icons and systray types of icons, and the bottom one is all taksbar items.

···

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