Hi everyone,
When I run the 2.8.3 python demo (wxPython 2.8.3, Python 2.5, Windows
Vista), all the buttons and controls have a Vista look and feel.
However when I create my own application, the buttons/controls have a
boring, flat, Win2K kind of look on Windows Vista (but look great on
XP). I am not using py2exe or anything like that, just running them
from source. Even the below simple example demonstrates my issue. I
can't figure out what the issue is since, from looking at everything
in the demo, wxPython can display the native controls nicely in Vista.
What am I doing wrong? What is the different between this and the
demo? I thought maybe it was PySimpleApp so I made a subclass of
wx.App like the demo does but that didn't fix it so I just posted the
simpler code. Any help will be GREATLY appreciated.
import wx
import wxaddons.sized_controls as sc
class MyFrame(sc.SizedFrame):
def __init__(self):
sc.SizedFrame.__init__(self, None)
panel = self.GetContentsPane()
panel.SetSizerType("vertical")
button = wx.Button(panel, label="I don't look nice on Vista")
button.SetSizerProps(halign="center")
self.Show(True)
if __name__ == "__main__":
app = wx.PySimpleApp()
frame = MyFrame()
app.MainLoop()
Thanks! PS, if someone can explain the deprecation warning I am
getting that would be great, this is my first time using
SizedControls.
Mike Rooney
mrooney@gmail.com
Hi Mike,
Mike Rooney wrote:
Hi everyone,
When I run the 2.8.3 python demo (wxPython 2.8.3, Python 2.5, Windows
Vista), all the buttons and controls have a Vista look and feel.
That has to do with no manifest file being there.
How are you running your code? I used Boa and it looks fine for me, rounded edges etc.
As the demo works for you, there most be a python.exe.manifest and/or pythonw.exe.manifest file in your Python installation. But whatever you use to run your app does not use the same python.exe or it does not have a manifest file.
The deprecation warning I see is:
C:\Python25\lib\site-packages\wxaddons\sized_controls.py:460: DeprecationWarning: Please use PyPanel.AddChild instead.
wx.PyPanel.base_AddChild(self, child)
I am sure Kevin can shed some light on this
.
Werner
There is a blog post from the WXwidgets http://wxwidgets.blogspot.com/ and the first blog entry discusses how the CPP toolkit looks in windows vista now since wxpython is a proxy for the CPP one there should be no difference!
···
On 4/11/07, Mike Rooney mxr@qvii.com wrote:
Mike Rooney wrote:
Hi Werner,
Werner F. Bruhin wrote:
Hi Mike,
Mike Rooney wrote:
Hi everyone,
When I run the 2.8.3
python demo (wxPython 2.8.3, Python 2.5, Windows
Vista), all the buttons and controls have a Vista look and feel.
That has to do with no manifest file being there.
How are you running your code? I used Boa and it looks fine for me,
rounded edges etc.
I have tried running it both through SPE and by just double-clicking
on the file, which in theory should use the same python and wxpython
as running the demo right? Either way I am pretty sure I have just one
version of python and one version of wxpython installed.
As the demo works for you, there most be a python.exe.manifest and/or
pythonw.exe.manifest file in your Python installation. But whatever
you use to run your app does not use the same python.exe or it does
not have a manifest file.
When I get back to my Vista machine I will look for these files, and
make sure everything is running on the same python/wx install. Thanks
for the information, hopefully there is something obviously off!
I think the difference is in running it with python.exe vs pythonw.exe.
The only way at first I could get it to have a Vista look and feel was
to run it in Scite, which I then discovered was running .py files with
pythonw.exe. I then went to a command prompt and tried running it with
python vs pythonw and that is what makes the difference. This doesn’t
seem right though, as they both have the exact same manifest files. I
thought the only difference was that pythonw doesn’t show a console
window, am I wrong? I don’t have to run applications with pyhonw.exe
on
XP to get the correct look and feel.
I am glad I found a way to make it look nice on Vista but an explanation
of this would be great if anyone understands it. I would love it to work
correctly running normally with python.exe so that I can have a console.
Maybe I am just doing something stupid? Thanks for any input!
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
–
http://www.goldwatches.com/watches.asp?Brand=39
http://www.wazoozle.com