My app looks grey and ugly in Windows 7 64-bit. What's is wrong with it?

I've run my application in Fedora 14 64-bit (with Python 2.7 and
wxPython 2.8.11.0 (gtk2-unicode)) and it looks beautiful. When i try
to run it in Windows 7 64-bit (with Python 2.7.1 64-bit and wxPython
2.8 (unicode) 64-bit) the background is grey and all the colors are
gone. In general it looks ugly.

I tried making a simple frame with a wx.StaticText, a menu bar and
status bar and the menu bar and status bar look fine but the
background of the wx.StaticText (and the empty space) still looks grey
and ugly.

My sample app:

import wx

app = wx.App(False)

frame = wx.Frame(None, title="Test Frame")

fileMenu = wx.Menu()

menuBar = wx.MenuBar()

menuBar.Append(fileMenu, '&File')

frame.SetMenuBar(menuBar)

frame.CreateStatusBar()

control = wx.StaticText(frame, \
label="This is a wx.StaticText")

frame.Show()

app.MainLoop()

The source code for my application is available here:
http://dl.dropbox.com/u/18522113/Periodic%20Table.tar.gz

I've run my application in Fedora 14 64-bit (with Python 2.7 and
wxPython 2.8.11.0 (gtk2-unicode)) and it looks beautiful. When i try
to run it in Windows 7 64-bit (with Python 2.7.1 64-bit and wxPython
2.8 (unicode) 64-bit) the background is grey and all the colors are
gone. In general it looks ugly.

My uneducated guess... it's a platform issue. Have you tried the same
app on other window versions?

···

On Sat, Jan 22, 2011 at 10:01 AM, Marc Dam <marc.j.b.dam@gmail.com> wrote:

I tried making a simple frame with a wx.StaticText, a menu bar and
status bar and the menu bar and status bar look fine but the
background of the wx.StaticText (and the empty space) still looks grey
and ugly.

My sample app:

import wx

app = wx.App(False)

frame = wx.Frame(None, title="Test Frame")

fileMenu = wx.Menu()

menuBar = wx.MenuBar()

menuBar.Append(fileMenu, '&File')

frame.SetMenuBar(menuBar)

frame.CreateStatusBar()

control = wx.StaticText(frame, \
label="This is a wx.StaticText")

frame.Show()

app.MainLoop()

The source code for my application is available here:
http://dl.dropbox.com/u/18522113/Periodic%20Table.tar.gz

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

--
The lawyer in me says argue...even if you're wrong. The scientist in
me... says shut up, listen, and then argue. But the lawyer won on
appeal, so now I have to argue due to a court order.

Furthermore, if you could be a scientific celebrity, would you want
einstein sitting around with you on saturday morning, while you're
sitting in your undies, watching Underdog?...Or better yet, would
Einstein want you to violate his Underdog time?

Can you imagine Einstein sitting around in his underware? Thinking
about the relativity between his pubic nardsac, and his Fruit of the
Looms, while knocking a few Dorito's crumbs off his inner brilliant
white thighs, and hailing E = mc**2, and licking the orangy,
delicious, Doritoey crust that layered his genetically rippled
fingertips?

But then again, J. Edgar Hoover would want his pantyhose intertwined
within the equation.

However, I digress, momentarily.

But Einstein gave freely, for humanity, not for gain, other than
personal freedom.

An equation that benefited all, and yet gain is a personal product.

Also, if you can answer it, is gravity anymore than interplanetary static cling?

Better yet. Formula = The newer the OS divided by / the amount of time
the developers of WX have had to adapt to the new OS

I believe you need to package a manifest file with your app so that wxPython will inherit the native look and feel.
http://wiki.wxpython.org/index.cgi/FAQ#Frequently_Asked_Questions.Native_Look_and_Feel

This StackOverflow thread seems to indicate that using Gui2Exe will take care of things for you automatically:
http://stackoverflow.com/questions/2725516/look-of-the-app-py2exe-wxpython

Without the manifest, I gather that wx on Windows defaults to (and I’m taking a wild, wild guess here) the standard Windows look and feel when wx was first being developed…?

···

On Sat, Jan 22, 2011 at 7:01 AM, Marc Dam marc.j.b.dam@gmail.com wrote:

I’ve run my application in Fedora 14 64-bit (with Python 2.7 and

wxPython 2.8.11.0 (gtk2-unicode)) and it looks beautiful. When i try

to run it in Windows 7 64-bit (with Python 2.7.1 64-bit and wxPython

2.8 (unicode) 64-bit) the background is grey and all the colors are

gone. In general it looks ugly.


www.fsrtechnologies.com

Not really. wxPython defaults to the unthemed look, which looks like Windows 2000. Normally, you should not see this when running your code. I know I never do. The only time I’ve seen it is if I create a binary with py2exe and don’t include the aforementioned manifest file. Unfortunately, py2exe isn’t advanced enough to read my mind and know that it should include that. I haven’t tried wxPython 64-bit, so I don’t know what’s up with that. Maybe the manifest is in the wrong location in the file system. That would be my guess.

···

On Sat, Jan 22, 2011 at 12:54 PM, Marc Tompkins marc.tompkins@gmail.com wrote:

On Sat, Jan 22, 2011 at 7:01 AM, Marc Dam marc.j.b.dam@gmail.com wrote:

I’ve run my application in Fedora 14 64-bit (with Python 2.7 and

wxPython 2.8.11.0 (gtk2-unicode)) and it looks beautiful. When i try

to run it in Windows 7 64-bit (with Python 2.7.1 64-bit and wxPython

2.8 (unicode) 64-bit) the background is grey and all the colors are

gone. In general it looks ugly.

I believe you need to package a manifest file with your app so that wxPython will inherit the native look and feel.
http://wiki.wxpython.org/index.cgi/FAQ#Frequently_Asked_Questions.Native_Look_and_Feel

This StackOverflow thread seems to indicate that using Gui2Exe will take care of things for you automatically:
http://stackoverflow.com/questions/2725516/look-of-the-app-py2exe-wxpython

Without the manifest, I gather that wx on Windows defaults to (and I’m taking a wild, wild guess here) the standard Windows look and feel when wx was first being developed…?

Mike Driscoll

Blog: http://blog.pythonlibrary.org

Use a wx.Panel. Make the child of the frame be a panel and use the panel as the parent of the static text.

···

On 1/22/11 7:01 AM, Marc Dam wrote:

I've run my application in Fedora 14 64-bit (with Python 2.7 and
wxPython 2.8.11.0 (gtk2-unicode)) and it looks beautiful. When i try
to run it in Windows 7 64-bit (with Python 2.7.1 64-bit and wxPython
2.8 (unicode) 64-bit) the background is grey and all the colors are
gone. In general it looks ugly.

I tried making a simple frame with a wx.StaticText, a menu bar and
status bar and the menu bar and status bar look fine but the
background of the wx.StaticText (and the empty space) still looks grey
and ugly.

--
Robin Dunn
Software Craftsman

Unless it is a 32/64 bit issue, Robin's advices are good.

eg. http://spinecho.ze.cx/ > PeriodicTable

Thank you for all your help. Using a wx.Panel as background solved my
issues and my app now looks native :slight_smile:

···

On 22 Jan., 20:18, Robin Dunn <ro...@alldunn.com> wrote:

On 1/22/11 7:01 AM, Marc Dam wrote:

> I've run my application in Fedora 14 64-bit (with Python 2.7 and
> wxPython 2.8.11.0 (gtk2-unicode)) and it looks beautiful. When i try
> to run it in Windows 7 64-bit (with Python 2.7.1 64-bit and wxPython
> 2.8 (unicode) 64-bit) the background is grey and all the colors are
> gone. In general it looks ugly.

> I tried making a simple frame with a wx.StaticText, a menu bar and
> status bar and the menu bar and status bar look fine but the
> background of the wx.StaticText (and the empty space) still looks grey
> and ugly.

Use a wx.Panel. Make the child of the frame be a panel and use the
panel as the parent of the static text.

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

I'm curious if you are able to see menu icons in your app(s) with this
combination. I do not, but had no problem with Fedora 12.

Thanks,
Dan

···

On Jan 22, 10:01 am, Marc Dam <marc.j.b....@gmail.com> wrote:

I've run my application in Fedora 14 64-bit (with Python 2.7 and
wxPython 2.8.11.0 (gtk2-unicode)) and it looks beautiful.

Whether or not the menu icons are shown is a GNOME preference setting.

···

On 1/24/11 10:11 AM, Dan wrote:

I'm curious if you are able to see menu icons in your app(s) with this
combination. I do not, but had no problem with Fedora 12.

--
Robin Dunn
Software Craftsman