When I add a status bar to a toolbar, the message is clipped.

Any ideas?

import sys, os

import pygtk
pygtk.require('2.0')
import gtk
from gtk import gdk

class NavBar(gtk.Toolbar):
    
    def __init__(self):
        gtk.Toolbar.__init__(self)
        iconSize = gtk.ICON_SIZE_SMALL_TOOLBAR
        self.set_border_width(5)
        self.set_style(gtk.TOOLBAR_ICONS)

        def panx(button, direction):
            print 'pan', direction

        iconw = gtk.Image()
        iconw.set_from_stock(gtk.STOCK_GO_BACK, iconSize)
        self.bLeft = self.append_item(
            'Left',
            'Move back in time',
            'Private',
            iconw,
            panx,
            0)

        iconw = gtk.Image()
        iconw.set_from_stock(gtk.STOCK_GO_FORWARD, iconSize)
        self.bRight = self.append_item(
            'Right',
            'Move forward in time',
            'Private',
            iconw,
            panx,
            1)
        self.bRight.connect("scroll_event", panx)

        self.statbar = gtk.Statusbar()
        self.statbar.show()
        self.statbarCID = self.statbar.get_context_id('my stat bar')
        self.append_widget(self.statbar, 'Status bar', 'Status bar')
        self.update_status_bar('Message: ')

    def update_status_bar(self, msg):
        self.statbar.pop(self.statbarCID) 
        mid = self.statbar.push(self.statbarCID, 'Message: ' + msg)





win = gtk.Window()
toolbar = NavBar()
toolbar.show()
win.add(toolbar)

win.show()
gtk.mainloop()

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to