C M
unread,Dec 16, 2009, 12:59:53 AM12/16/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wxPytho...@googlegroups.com
(Ubuntu 8.10, wxPython 2.8.10, Python 2.5)
If someone has Linux, can you run the code below
and tell me if you also see that the font size, which
should be 8 point, is actually larger than that--looks
to be like 10 or 12 point--and if the text area is bleeding
out beyond the margin of the combobox?
Because that is what I am seeing with the very simple
code (at bottom). Attached also are two screenshots,
one running the code, the other using the Boa Constructor
"Designer" window, which is a visual workspace for how
the widget should look. As you can see, the Boa one
looks OK, whereas the actually running frame shows
the problem described.
The other point is: I can Set() the font on this combobox
to 18 point font and when actually running it doesn't
honor this at all--it just keeps it at 10 point or whatever
is in the first image shown below. In Boa's designer,
though, yes, then I see the 18 point font.
I don't see this problem when using a wxComboCtrl
(used with a popup), but do see it with the very common
wxComboBox. And I do not see this issue with WinXP.
Any ideas?
Thanks,
Che
-----------------------
#Boa:Frame:Frame1
import wx
def create(parent):
return Frame1(parent)
[wxID_FRAME1, wxID_FRAME1COMBOBOX1, wxID_FRAME1PANEL1,
] = [wx.NewId() for _init_ctrls in range(3)]
class Frame1(wx.Frame):
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
pos=wx.Point(319, 175), size=wx.Size(318, 210),
style=wx.DEFAULT_FRAME_STYLE, title='Frame1')
self.SetClientSize(wx.Size(318, 210))
self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self,
pos=wx.Point(0, 0), size=wx.Size(318, 210),
style=wx.TAB_TRAVERSAL)
self.comboBox1 = wx.ComboBox(choices=[], id=wxID_FRAME1COMBOBOX1,
name='comboBox1', parent=self.panel1, pos=wx.Point(24, 48),
size=wx.Size(240, 20), style=0, value='comboBox1')
self.comboBox1.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False,
u'Sans'))
def __init__(self, parent):
self._init_ctrls(parent)
if __name__ == '__main__':
app = wx.PySimpleApp()
frame = create(None)
frame.Show()
app.MainLoop()
-----------------