RSS Forums RSS
Please support our Python advertiser: Programming Forums
Views: 639 | Replies: 1 | Thread Tools  Display Modes
Reply
Join Date: Jan 2008
Posts: 1
Reputation: AsymptoticCoder is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
AsymptoticCoder AsymptoticCoder is offline Offline
Newbie Poster

Question wxPanel Background is Wrong

  #1  
Jan 27th, 2008
I am hoping somebody can help with a very frustrating problem I am facing.

I am working with a MDIChildFrame that has one panel called mainPanel. I set the background style of both the panel and the child frame to wx.BG_STYLE_SYSTEM.

Yet, when I run the program the background is white (and very ugly), rather than the standard aqua grey pattern that is common on the Mac.

If I open the frame in Boa's frame designer, the background is correct. What could I be doing wrong?

...
class selectTAs(wx.MDIChildFrame):
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.MDIChildFrame.__init__(self, id=wxID_SELECTTAS, name='selectTAs',
              parent=prnt, pos=wx.Point(292, 150), size=wx.Size(734, 468),
              style=wx.DEFAULT_FRAME_STYLE, title='Select Possible TAs...')
        self.SetClientSize(wx.Size(734, 446))
        self.SetAutoLayout(False)
        self.SetBackgroundStyle(wx.BG_STYLE_SYSTEM)
        self.SetToolTipString('')

        self.mainPanel = wx.Panel(id=wxID_SELECTTASMAINPANEL, name='mainPanel',
              parent=self, pos=wx.Point(0, 0), size=wx.Size(734, 446),
              style=wx.TAB_TRAVERSAL)
        self.mainPanel.SetBackgroundStyle(wx.BG_STYLE_SYSTEM)
...
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2004
Posts: 2,576
Reputation: vegaseat will become famous soon enough vegaseat will become famous soon enough 
Rep Power: 11
Solved Threads: 184
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: wxPanel Background is Wrong

  #2  
Jan 28th, 2008
Sorry, I am running Windows XP, but could you try a self.mainPanel.Refresh() after self.mainPanel.SetBackgroundStyle(wx.BG_STYLE_SYSTEM)? Just a WAG.
May 'the Google' be with you!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Other Threads in the Python Forum
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 9:28 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC