Small cosmetic bug with Statusbar

Hi all,

If you put a wxStatusBar on a fixed sized wxFrame, it is still possible to
resize the status bar using the gripper. See demo code below.

Jean-Michel Fauth, Switzerland

#-*- coding: iso-8859-1 -*-

···

#-------------------------------------------------------------------
# TestStatusbar.py
# win98, Py 2.3, wxPy 2.4.2.4
#-------------------------------------------------------------------

from wxPython.wx import *

#-------------------------------------------------------------------

class MyPanel(wxPanel):
    
    def __init__(self, parent, id):
        wxPanel.__init__(self, parent, id, wxDefaultPosition, wxDefaultSize)
    
#-------------------------------------------------------------------

class MyFrame(wxFrame):

    def __init__(self, parent, id):
        sty = wxSYSTEM_MENU | wxCAPTION | wxMINIMIZE_BOX
        #~ sty = wxDEFAULT_FRAME_STYLE
        wxFrame.__init__(self, parent, id, 'TestStatusbarl', wxPoint(10, 10), wxSize(600, 500), style=sty)

        #status bar
        self.sb = wxStatusBar(self, -1)
        self.sb.SetFieldsCount(3)
        self.sb.PushStatusText('field one', 0)
        self.sb.PushStatusText('field two', 1)
        self.sb.PushStatusText('field three', 2)
        self.SetStatusBar(self.sb)
        
        self.panel = MyPanel(self, -1)

#-------------------------------------------------------------------

class MyApp(wxApp):
    
    def OnInit(self):
        frame = MyFrame(None, -1)
        frame.Show(True)
        self.SetTopWindow(frame)
        return True

#-------------------------------------------------------------------

def main():
    print 'main is running...'
    app = MyApp(0)
    app.MainLoop()

#-------------------------------------------------------------------

if __name__ == '__main__' :
    main()

#eof-------------------------------------------------------------------

Jean-Michel Fauth wrote:

Hi all,

If you put a wxStatusBar on a fixed sized wxFrame, it is still possible to
resize the status bar using the gripper. See demo code below.

It's probably a bug in win98 as your sample does not behave that way on win2k or XP.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn <robin@alldunn.com> writes:

Jean-Michel Fauth wrote:

Hi all,
If you put a wxStatusBar on a fixed sized wxFrame, it is still
possible to
resize the status bar using the gripper. See demo code below.

It's probably a bug in win98 as your sample does not behave that way
on win2k or XP.

It also doesn't happen on Linux.

···

--
Godoy. <godoy@metalab.unc.edu>