Workaround for strange wxPython display error.

Since a while, wxPython has been refusing to correctly display strings with a dash in them in the staticText object. Given a string "xx-yy", only "xx" is displayed. This caused some problems for protocols with dashes in their protocol names. I've worked around it by replacing all occurrences of "-" by "_".
This commit is contained in:
Cas Cremers 2007-05-29 16:39:25 +02:00
parent 057909d0c5
commit d5ba325233

View File

@ -376,6 +376,7 @@ class ResultWindow(wx.Frame):
def BuildClaim(self,grid,cl,ypos):
# a support function
def addtxt(txt,column):
txt = txt.replace("-","_") # Strange fix for wx.StaticText as it cuts off the display.
grid.Add(wx.StaticText(self,-1,txt),(ypos,column),(1,1),wx.ALIGN_CENTER_VERTICAL|wx.ALL,10)
n = len(cl.attacks)