Update of /cvsroot/pythoncard/PythonCard/components
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23010/components
Modified Files:
textarea.py
Log Message:
added AppendText ScrollLines workaround for Windows
Index: textarea.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/components/textarea.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** textarea.py 25 Sep 2004 03:21:20 -0000 1.27
--- textarea.py 28 Sep 2004 14:41:50 -0000 1.28
***************
*** 75,78 ****
--- 75,89 ----
# wxPython 2.5.1.5 workaround
if wx.Platform == '__WXMSW__':
+
+ def appendText(self, aString):
+ """Appends the text to the end of the text widget.
+ After the text is appended, the insertion point will be at the end
+ of the text widget. If this behavior is not desired, the programmer
+ should use getInsertionPoint and setInsertionPoint."""
+ self.AppendText(aString)
+ # workaround for scroll bug
+ # http://sourceforge.net/tracker/?func=detail&aid=665381&group_id=9863&atid=109863
+ self.ScrollLines(-1)
+
# KEA 2004-04-19
# workaround Windows bug where control is shown
***************
*** 98,102 ****
# returning text with \r instead of \n
def _getText(self):
! return self.GetValue().replace('\r', '\n')
text = property(_getText, wx.TextCtrl.SetValue)
--- 109,113 ----
# returning text with \r instead of \n
def _getText(self):
! return "\n".join(self.GetValue().splitlines())
text = property(_getText, wx.TextCtrl.SetValue)
|