Author: johannes
Date: 2006-08-17 06:59:21 -0500 (Thu, 17 Aug 2006)
New Revision: 8564
Modified:
branches/forms-0.5/src/input/displayHandlers/Cursor.py
branches/forms-0.5/src/input/displayHandlers/Password.py
branches/forms-0.5/src/uidrivers/wx26/widgets/entry.py
Log:
Allways do a SelectAll when entering editmode via keyboard focus
Modified: branches/forms-0.5/src/input/displayHandlers/Cursor.py
===================================================================
--- branches/forms-0.5/src/input/displayHandlers/Cursor.py 2006-08-17
09:21:19 UTC (rev 8563)
+++ branches/forms-0.5/src/input/displayHandlers/Cursor.py 2006-08-17
11:59:21 UTC (rev 8564)
@@ -168,7 +168,7 @@
selection=self.getSelectionArea(),
))
else:
- self.dispatchEvent(events.Event('updateEntryEditor',
+ self.dispatchEvent(events.Event('updateEntryEditor',
object = self.entry,
display=self.display,
cursor=self._cursor,
@@ -211,6 +211,7 @@
self._cursor = len(self.display)
# Ensure cursor is properly placed.
+ self.setSelectionArea(0, self._cursor)
self.generateRefreshEvent()
def _endEdit(self, event):
Modified: branches/forms-0.5/src/input/displayHandlers/Password.py
===================================================================
--- branches/forms-0.5/src/input/displayHandlers/Password.py 2006-08-17
09:21:19 UTC (rev 8563)
+++ branches/forms-0.5/src/input/displayHandlers/Password.py 2006-08-17
11:59:21 UTC (rev 8564)
@@ -61,6 +61,7 @@
self.cursor = len(self.display)
# Ensure cursor is properly placed.
+ self.setSelectionArea(0, self.cursor)
self.generateRefreshEvent()
Modified: branches/forms-0.5/src/uidrivers/wx26/widgets/entry.py
===================================================================
--- branches/forms-0.5/src/uidrivers/wx26/widgets/entry.py 2006-08-17
09:21:19 UTC (rev 8563)
+++ branches/forms-0.5/src/uidrivers/wx26/widgets/entry.py 2006-08-17
11:59:21 UTC (rev 8564)
@@ -226,6 +226,10 @@
args = widget.GetMark ()
restore = widget.SetMark
+ elif isinstance(widget, wx.TextCtrl):
+ args = widget.GetSelection()
+ restore = widget.SetSelection
+
elif hasattr (widget, 'GetInsertionPoint'):
args = (widget.GetInsertionPoint (),)
restore = widget.SetInsertionPoint
_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue