commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r9025 - trunk/gnue-forms/src/uidrivers/win32


From: btami
Subject: [gnue] r9025 - trunk/gnue-forms/src/uidrivers/win32
Date: Fri, 10 Nov 2006 16:32:09 -0600 (CST)

Author: btami
Date: 2006-11-10 16:32:08 -0600 (Fri, 10 Nov 2006)
New Revision: 9025

Modified:
   trunk/gnue-forms/src/uidrivers/win32/dialogs.py
Log:
minor dialog fixes

Modified: trunk/gnue-forms/src/uidrivers/win32/dialogs.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/win32/dialogs.py     2006-11-10 22:31:39 UTC 
(rev 9024)
+++ trunk/gnue-forms/src/uidrivers/win32/dialogs.py     2006-11-10 22:32:08 UTC 
(rev 9025)
@@ -523,8 +523,8 @@
     self.template.append([BUTTON, textEncode(u_('>> Details')), ID, (0, 0, 56, 
15), s])
 
     self.detailID = ID = getNextId()
-    s = cs | win32con.ES_MULTILINE | win32con.ES_READONLY | 
win32con.WS_TABSTOP \
-           | win32con.ES_AUTOVSCROLL | win32con.WS_VSCROLL
+    s = cs | win32con.ES_MULTILINE | win32con.ES_READONLY | 
win32con.WS_TABSTOP #\
+#           | win32con.ES_AUTOVSCROLL | win32con.WS_VSCROLL
     es = win32con.WS_EX_STATICEDGE
     self.template.append([EDIT, textEncode(self.detail), ID, position, s, es])
 
@@ -576,7 +576,7 @@
     dlgWidth = max(dlgWidth, self.Width(self.messageID))
     if self._showsDetail:
       dlgWidth = max(dlgWidth, self.Width(self.detailID))
-
+ 
     ypos = border
 
     self.SetPosition(self.messageID, border+40, ypos)
@@ -616,11 +616,11 @@
       # GetWindowText has only 512 byte buffer, sigh...
       if id == self.detailID:
         text = self.detail
-      if '\r\n' in text:
-        w = max ([win32gui.GetTextExtentPoint32(self.dc, t) [0] for t in 
text.split ('\r\n')])
+      if '\n' in text:
+        w = max ([win32gui.GetTextExtentPoint32(self.dc, t) [0] for t in 
text.split ('\n')])
       else:
         w, h = win32gui.GetTextExtentPoint32(self.dc, text)
-      return w + 40
+      return w
     else:
       l,t,r,b = win32gui.GetWindowRect(item)
       return r-l
@@ -632,12 +632,12 @@
       text = win32gui.GetWindowText(item)
       if id == self.detailID:
         text = self.detail
-      if '\r\n' in text:
-        h = sum ([win32gui.GetTextExtentPoint32(self.dc, t) [1] -2 for t in 
text.split ('\r\n')])
+      if '\n' in text:
+        h = sum ([win32gui.GetTextExtentPoint32(self.dc, t) [1] -2 for t in 
text.split ('\n')])
       else:
         w, h = win32gui.GetTextExtentPoint32(self.dc, text)
-      if id == self.detailID:
-        h += -8 # extra for WS_EX_STATICEDGE
+      #~ if id == self.detailID:
+        #~ h += -8 # extra for WS_EX_STATICEDGE
       return h
     else:
       l,t,r,b = win32gui.GetWindowRect(item)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]