[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8184 - trunk/gnue-forms/src/uidrivers/wx26
From: |
johannes |
Subject: |
[gnue] r8184 - trunk/gnue-forms/src/uidrivers/wx26 |
Date: |
Thu, 2 Mar 2006 08:06:44 -0600 (CST) |
Author: johannes
Date: 2006-03-02 08:06:44 -0600 (Thu, 02 Mar 2006)
New Revision: 8184
Modified:
trunk/gnue-forms/src/uidrivers/wx26/dialogs.py
Log:
Better placement and sizing of exception dialog
Modified: trunk/gnue-forms/src/uidrivers/wx26/dialogs.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/dialogs.py 2006-03-02 07:36:39 UTC
(rev 8183)
+++ trunk/gnue-forms/src/uidrivers/wx26/dialogs.py 2006-03-02 14:06:44 UTC
(rev 8184)
@@ -461,8 +461,13 @@
wx.DefaultSize, 0)
gbs.Add (msg, (0, 1), flag = wx.EXPAND | wx.ALIGN_LEFT)
+ (mxW, mxH) = self.GetMaxSize ()
+ h = (len (detail.splitlines ()) + 1) * (self.GetCharHeight () + 2)
+ w = max ([len (i) for i in detail.splitlines ()]) * self.GetCharWidth ()
+ size = (min (w, int (mxW * 0.9)), min (h, int (mxH * 0.8)))
+
self.detailText = wx.TextCtrl (self, wx.ID_ANY, detail, wx.DefaultPosition,
- wx.DefaultSize, wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_DONTWRAP)
+ size, wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_DONTWRAP)
# Don't forget to put an empty item into the 'empty' cells. This prevents a
# crason on win32 and mac os x
@@ -497,6 +502,8 @@
self.__changedFont = False
self.SetSizerAndFit (dls)
+ self.CenterOnScreen ()
+ self.Raise ()
# ---------------------------------------------------------------------------
@@ -526,6 +533,7 @@
self.gbs.Layout ()
self.Fit ()
+ self.CenterOnScreen ()
self.Refresh ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8184 - trunk/gnue-forms/src/uidrivers/wx26,
johannes <=