Author: reinhard
Date: 2007-04-09 17:01:12 -0500 (Mon, 09 Apr 2007)
New Revision: 9473
Modified:
trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
Log:
Avoid line breaks in labels.
Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py 2007-04-09 21:51:28 UTC (rev 9472)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py 2007-04-09 22:01:12 UTC (rev 9473)
@@ -210,7 +210,12 @@
label.Bind(wx.EVT_LEFT_UP, self.__on_label_click)
elif self._gfObject.label:
- label = wx.StaticText(parent, -1, self._gfObject.label)
+ # Replace blanks by non-breaking space to avoid random linebreaks
+ # in labels (sometimes done by wx, probably due to rounding errors
+ # in size calculations)
+ text = self._gfObject.label.replace(u" ", u"\240")
+ print text
+ label = wx.StaticText(parent, -1, text)
else:
label = None
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.