wxpython - wxtoolbar font size

Frank Niessink frank at niessink.com
Tue Nov 14 21:31:22 CET 2006

> Hi all i want to set wx.toolbar font size and i use this code:
> self.tb1 = wx.ToolBar(self, -1, style=wx.TB_HORIZONTAL|
>                                     wx.TB_TEXT)
> self.tb1.SetFont(wx.Font(9, wx.DEFAULT, wx.NORMAL,0))
> self.SetToolBar(self.tb1)
> but i obtain nothing. Is possibile? where i wrong?
> I use wxpython 2.6.3 on ubuntu edgy

You need to call self.tb1.Realize(). BTW, you probably want to add some 
tools to the toolbar too. See attachment.

Cheers, Frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: toolbar.py
Type: text/x-python
Size: 518 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20061114/e80155dd/attachment.py>

More information about the Python-list mailing list