I've written an app that uses uses wxPython 2.4.2.4. When I run the app under Python 2.3 in Windows XP, the controls are rendered in the new wx look and feel (i.e. the buttons are rounded, the static sizers have a light blue border, etc.)
When I freeze my app using py2exe and run it on the same machine, the app adopts the old wx look and feel (i.e. square buttons, sunken border around static sizers, etc.)
Does anyone know why this happens? I've also tested the frozen app on Windows ME and have gotten the same behavior. Could it be that py2exe is not including some file that implements the new wx look and feel?
IIRC there's an xml file (named exename.exe.manifest) required in your app's .exe's directory that tells the app to use XP new-style look and feel. You'll probably find a copy in your Python 2.3 directory, copy to your py2exe'd directory and rename for your new .exe. (you may need to edit it slightly as well). Don't have XP here, so can't offer much more info.
HTH,
Mike
Peter Parente wrote:
···
I've written an app that uses uses wxPython 2.4.2.4. When I run the app under Python 2.3 in Windows XP, the controls are rendered in the new wx look and feel (i.e. the buttons are rounded, the static sizers have a light blue border, etc.)
When I freeze my app using py2exe and run it on the same machine, the app adopts the old wx look and feel (i.e. square buttons, sunken border around static sizers, etc.)
Does anyone know why this happens? I've also tested the frozen app on Windows ME and have gotten the same behavior. Could it be that py2exe is not including some file that implements the new wx look and feel?
You need a manifest file, e.g. yourapp.exe.manifest.
I believe you can just copy it from e.g. wxPython and make some small changes.
See you
Werner
Peter Parente wrote:
···
I've written an app that uses uses wxPython 2.4.2.4. When I run the app under Python 2.3 in Windows XP, the controls are rendered in the new wx look and feel (i.e. the buttons are rounded, the static sizers have a light blue border, etc.)
When I freeze my app using py2exe and run it on the same machine, the app adopts the old wx look and feel (i.e. square buttons, sunken border around static sizers, etc.)
Does anyone know why this happens? I've also tested the frozen app on Windows ME and have gotten the same behavior. Could it be that py2exe is not including some file that implements the new wx look and feel?
Thanks,
Pete
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
Just noticed that even with a manifest files some things don't adopt the XP themes.
In my case buttons on a panel are o.k. but buttons on a panel which is on a notebook tab are NOT o.k.
I recall some problems with notebook and manifest (have to set background color manually), this might be another problem. Hope someone else can enlighten us.
See you
Werner
Peter Parente wrote:
···
I've written an app that uses uses wxPython 2.4.2.4. When I run the app under Python 2.3 in Windows XP, the controls are rendered in the new wx look and feel (i.e. the buttons are rounded, the static sizers have a light blue border, etc.)
When I freeze my app using py2exe and run it on the same machine, the app adopts the old wx look and feel (i.e. square buttons, sunken border around static sizers, etc.)
Does anyone know why this happens? I've also tested the frozen app on Windows ME and have gotten the same behavior. Could it be that py2exe is not including some file that implements the new wx look and feel?
Thanks,
Pete
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
Just noticed that even with a manifest files some things don't adopt the XP themes.
In my case buttons on a panel are o.k. but buttons on a panel which is on a notebook tab are NOT o.k.
I recall some problems with notebook and manifest (have to set background color manually), this might be another problem. Hope someone else can enlighten us.
There was some code added that tries to make the notebook and it's contents conform more closely to the current theme if themes are enabled for the app. Part of that is recursively changing the default background colour of items. Personally I disagree with this behaviour but that's the way it is for now.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I've written an app that uses uses wxPython 2.4.2.4. When I run the
app under Python 2.3 in Windows XP, the controls are rendered in the
new wx look and feel (i.e. the buttons are rounded, the static sizers
have a light blue border, etc.)
When I freeze my app using py2exe and run it on the same machine, the
app adopts the old wx look and feel (i.e. square buttons, sunken
border around static sizers, etc.)
As others have explained, you need a manifest file. This can also be
'compiled' as resource into the executable, the upcoming py2exe 0.5
includes samples how to do this.
Just noticed that even with a manifest files some things don't adopt the XP themes.
In my case buttons on a panel are o.k. but buttons on a panel which is on a notebook tab are NOT o.k.
I recall some problems with notebook and manifest (have to set background color manually), this might be another problem. Hope someone else can enlighten us.
There was some code added that tries to make the notebook and it's contents conform more closely to the current theme if themes are enabled for the app. Part of that is recursively changing the default background colour of items. Personally I disagree with this behaviour but that's the way it is for now.
Is there a way to tell the buttons on the notebook pages to "take on the theme" format (rounded edges).
I've written an app that uses uses wxPython 2.4.2.4. When I run the
app under Python 2.3 in Windows XP, the controls are rendered in the
new wx look and feel (i.e. the buttons are rounded, the static sizers
have a light blue border, etc.)
When I freeze my app using py2exe and run it on the same machine, the
app adopts the old wx look and feel (i.e. square buttons, sunken
border around static sizers, etc.)
As others have explained, you need a manifest file. This can also be
'compiled' as resource into the executable, the upcoming py2exe 0.5
includes samples how to do this.
Just noticed that you have a prerelease on sourceforge, had to try it.
FYI, installed 0.5.0a5 and run py2exe from within Boa, it doesn't like many of the setup.cfg entries, below the ones it errored for me:
BTW the setup.py and setup.cfg I used work without problem on 0.4.
Will just be patient and wait for the 0.5 release with doc, also your samples included are already very useful.
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
"Werner F. Bruhin" <werner.bruhin@free.fr> writes:
Hi Thomas,
Thomas Heller wrote:
Peter Parente <parente@cs.unc.edu> writes:
I've written an app that uses uses wxPython 2.4.2.4. When I run the
app under Python 2.3 in Windows XP, the controls are rendered in the
new wx look and feel (i.e. the buttons are rounded, the static sizers
have a light blue border, etc.)
When I freeze my app using py2exe and run it on the same machine, the
app adopts the old wx look and feel (i.e. square buttons, sunken
border around static sizers, etc.)
As others have explained, you need a manifest file. This can also be
'compiled' as resource into the executable, the upcoming py2exe 0.5
includes samples how to do this.
Just noticed that you have a prerelease on sourceforge, had to try it.
FYI, installed 0.5.0a5 and run py2exe from within Boa, it doesn't like
many of the setup.cfg entries, below the ones it errored for me:
BTW the setup.py and setup.cfg I used work without problem on 0.4.
Will just be patient and wait for the 0.5 release with doc, also your
I'm not sure how long to wait for the docs <wink>, so here is my
comment: Version resources are not yet supported (will be in 0.5.0a7),
and they are done differently. The basic idea is to do everything from
within the setup script with only very few command line options, and not
rely on setup.cfg any more.
"Werner F. Bruhin" <werner.bruhin@free.fr> writes:
Hi Thomas,
Thomas Heller wrote:
Peter Parente <parente@cs.unc.edu> writes:
I've written an app that uses uses wxPython 2.4.2.4. When I run the
app under Python 2.3 in Windows XP, the controls are rendered in the
new wx look and feel (i.e. the buttons are rounded, the static sizers
have a light blue border, etc.)
When I freeze my app using py2exe and run it on the same machine, the
app adopts the old wx look and feel (i.e. square buttons, sunken
border around static sizers, etc.)
As others have explained, you need a manifest file. This can also be
'compiled' as resource into the executable, the upcoming py2exe 0.5
includes samples how to do this.
Just noticed that you have a prerelease on sourceforge, had to try it.
FYI, installed 0.5.0a5 and run py2exe from within Boa, it doesn't like
many of the setup.cfg entries, below the ones it errored for me:
BTW the setup.py and setup.cfg I used work without problem on 0.4.
Will just be patient and wait for the 0.5 release with doc, also your
I'm not sure how long to wait for the docs <wink>, so here is my
comment: Version resources are not yet supported (will be in 0.5.0a7),
and they are done differently. The basic idea is to do everything from
within the setup script with only very few command line options, and not
rely on setup.cfg any more.
You don't have to wait, you know it all!
Having everything in setup.py is actually preferable to me, especially as my setup.cfg only has a few lines. Don't like command line options at all (especially as I call py2exe always from within Boa), so hope that all of them can be defined in setup.py in some way.
Extensive sample files with one line or maximum one paragraph explanations are great.
def savebg(win):
l = [win]
bg = {}
while l:
win = l.pop(0)
if isinstance(win, wxButton):
continue
l += win.GetChildren()
bg[win] = win.GetBackgroundColour()
return bg
def restorebg(win, bg):
l = [win]
while l:
win = l.pop(0)
l += win.GetChildren()
try: win.SetBackgroundColour(bg[win])
except KeyError: pass
## wrap all calls to wxNotebook.AddPage() in savebg() and restorebg()
page = MyPageClass(nb)
bg = savebg(page)
nb.AddPage(page, 'Title')
restorebg(page, bg)
···
On Mon, Dec 29, 2003 at 02:06:10PM -0800, Robin Dunn wrote:
There was some code added that tries to make the notebook and it's
contents conform more closely to the current theme if themes are enabled
for the app. Part of that is recursively changing the default
background colour of items. Personally I disagree with this behaviour
but that's the way it is for now.
There was some code added that tries to make the notebook and it's contents conform more closely to the current theme if themes are enabled for the app. Part of that is recursively changing the default background colour of items. Personally I disagree with this behaviour but that's the way it is for now.
Is there a way to tell the buttons on the notebook pages to "take on the theme" format (rounded edges).
Looking at the 2.4.2.4 demo on XP it seems to me that they already are, unless you change the background colour of the button (which puts them into ownerdraw mode.) For example, look at the buttons along the bottom of the wxHtmlWindow sample.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
There was some code added that tries to make the notebook and it's contents conform more closely to the current theme if themes are enabled for the app. Part of that is recursively changing the default background colour of items. Personally I disagree with this behaviour but that's the way it is for now.
Is there a way to tell the buttons on the notebook pages to "take on the theme" format (rounded edges).
Looking at the 2.4.2.4 demo on XP it seems to me that they already are, unless you change the background colour of the button (which puts them into ownerdraw mode.) For example, look at the buttons along the bottom of the wxHtmlWindow sample.
Yep, I did change the background, easy to fix.
But, on some I like to change the foreground, which causes the same problem. Is there a way to change the foreground and then tell it to use the "XP edges"?
Looking at the 2.4.2.4 demo on XP it seems to me that they already are, unless you change the background colour of the button (which puts them into ownerdraw mode.) For example, look at the buttons along the bottom of the wxHtmlWindow sample.
Yep, I did change the background, easy to fix.
But, on some I like to change the foreground, which causes the same problem. Is there a way to change the foreground and then tell it to use the "XP edges"?
Not currently. The only way to change the button colours on Windows is to draw the button yourself (OWNERDRAW mode), and the OwnerDraw code in wxButton doesn't yet use the themed drawing APIs to do it. It's possible that it could though if somebody takes to time to figure it out and submit a patch.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!