Author: johannes
Date: 2007-06-18 04:07:56 -0500 (Mon, 18 Jun 2007)
New Revision: 9719
Modified:
trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
Log:
Do not wordwrap contents of StaticText (even within grids)
Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py 2007-06-14 14:11:16 UTC (rev 9718)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py 2007-06-18 09:07:56 UTC (rev 9719)
@@ -498,7 +498,11 @@
finally:
if self.in_grid and widget._gnue_label_:
if isinstance(widget._gnue_label_, wx.StaticText):
- widget._gnue_label_.SetLabel("%s" % value)
+ # 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 = ("%s" % value).replace(u" ", u"\240")
+ widget._gnue_label_.SetLabel(text)
else:
widget._gnue_label_.SetValue(value)
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.