TextCtrlAutoComplete.py
changeset 326 386566f263f3
parent 295 bc6fc07c3153
child 426 3f285782ac9b
--- a/TextCtrlAutoComplete.py	Mon Mar 23 16:39:23 2009 +0100
+++ b/TextCtrlAutoComplete.py	Mon Mar 23 16:40:02 2009 +0100
@@ -45,7 +45,7 @@
 
         #Some variables
         self._dropDownClick = dropDownClick
-        self._lastinsertionpoint = 0
+        self._lastinsertionpoint = None
         
         self._screenheight = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y)
         self.element_path = element_path
@@ -124,6 +124,7 @@
     def onClickToggleUp(self, event):
         if self.GetInsertionPoint() == self._lastinsertionpoint:
             self._showDropDown(not self.dropdown.IsShown())
+        self._lastinsertionpoint = None
         event.Skip()
 
     def onControlChanged(self, event):