Hi there,
I’m beginning a new project using wxPython along with matplotlib to draw some graphs. I’ve gone through wxPython in Action a few times and am using it as a reference, which is working out well. I’m also going through the demo code distributed with wxPython 2.8.9.2 and my head is sort of spinning with all of the possible things I can choose from. I’m excited and scared at the same time. It’s a pretty amazing project so kudos to the community. Anyway…this is my first post so on to my question.
I’d like to use wx.aui.AuiManager for the overall layout. The demo code on from the website works just fine as does all of the AUI_*.py examples with the demo. I’m beginning to layout the structure of my own program and the style that I’m getting is slightly different than all of the demos. Each individual pane doesn’t have the nice shading in the menubar…it’s grayed out so I can’t see the caption or minimize/maximize icons. Also, the borders in between the panes is grayed out…I can drag the borders and resize the panes, but I can’t see them.
I’ve looked all over to find differences in the styles that I’m setting on the main window and other items but can’t find anything. My code is slighly more complex than the demos simply because compoents reside in different files, but I don’t think that should make much difference.
Any tips appreciated!
BZ
Hi Brian,
2009/4/8 Brian Zambrano:
Hi there,
I'm beginning a new project using wxPython along with matplotlib to draw
some graphs. I've gone through wxPython in Action a few times and am using
it as a reference, which is working out well. I'm also going through the
demo code distributed with wxPython 2.8.9.2 and my head is sort of spinning
with all of the possible things I can choose from. I'm excited and scared
at the same time. It's a pretty amazing project so kudos to the community.
Anyway....this is my first post so on to my question.
I'd like to use wx.aui.AuiManager for the overall layout. The demo code on
from the website works just fine as does all of the AUI_*.py examples with
the demo. I'm beginning to layout the structure of my own program and the
style that I'm getting is *slightly* different than all of the demos. Each
individual pane doesn't have the nice shading in the menubar.....it's grayed
out so I can't see the caption or minimize/maximize icons. Also, the
borders in between the panes is grayed out...I can drag the borders and
resize the panes, but I can't see them.
I've looked all over to find differences in the styles that I'm setting on
the main window and other items but can't find anything. My code is slighly
more complex than the demos simply because compoents reside in different
files, but I don't think that should make much difference.
Any tips appreciated!
I believe you will need to create a small runnable apps that
demonstrates the problem, see here:
http://wiki.wxpython.org/MakingSampleApps
It's not easy for us to guess what is going on without seeing some code.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
Hi,
you can get implicitly styled panes with no extra styling, cf. the
dummy code below;
I'd guess, the content of the panes may be laid out in some specific
way, which would interfere with the panes management, but definitely,
a sample app and possibly a screenshot will make the problem much
clearer.
Vlasta
···
2009/4/8 Brian Zambrano <brianz@gmail.com>:
Hi there,
...
I'd like to use wx.aui.AuiManager for the overall layout. The demo code on
from the website works just fine as does all of the AUI_*.py examples with
the demo. I'm beginning to layout the structure of my own program and the
style that I'm getting is *slightly* different than all of the demos. Each
individual pane doesn't have the nice shading in the menubar.....it's grayed
out so I can't see the caption or minimize/maximize icons. Also, the
borders in between the panes is grayed out...I can drag the borders and
resize the panes, but I can't see them.
...
Any tips appreciated!
BZ
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
###################################################
#! Python
# -*- coding: utf-8 -*-
import wx
import wx.aui
class MyFrame(wx.Frame):
def __init__(self, parent, id=-1, title='wx.aui Test',
pos=(10,10), size=(-1, -1), style=wx.DEFAULT_FRAME_STYLE):
wx.Frame.__init__(self, parent, id, title, pos, size, style)
self._mgr = wx.aui.AuiManager(self)
for pane_pos in ((wx.BOTTOM, wx.LEFT, wx.RIGHT, wx.TOP)*2 +
(wx.CENTER,)): # 2 panes on each side + centre
self._mgr.AddPane(wx.TextCtrl(self, -1, 'text...',
style=wx.TE_MULTILINE), pane_pos, 'pane...')
self._mgr.Update()
if __name__ == '__main__':
app = wx.App(redirect=False)
frm = MyFrame(None)
frm.Show()
app.MainLoop()
######################################
Ok…in coming up with some simple sample code to send as an example, I figure out what my mistake was. The issue was that I had a base class like this:
class BaseClass(wx.Frame):
def init(self, *args, **kwargs):
super(BaseClass, self).....etc
self._mgr = wx.aui.AuiManager....etc.
self.Bind(wx.aui.EVT_AUI_RENDER, self.onRender)
def onRender(self, event):
pass
class MainWindow(BaseClass):
etc
I guess the AUI_RENDER event never got a chance to do anything! Thanks for the responses…it did get me to figure out my mistake. Here are a couple of screenshots in case anyone is interested:
http://brianz.org/wx_bad_style.png
http://brianz.org/wx_good_style.png
BZ
···
On Wed, Apr 8, 2009 at 9:22 AM, Vlastimil Brom vlastimil.brom@gmail.com wrote:
I’d guess, the content of the panes may be laid out in some specific
way, which would interfere with the panes management, but definitely,
a sample app and possibly a screenshot will make the problem much
clearer.