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)
 



_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue

Reply via email to