TextCtrlAutoComplete.py
changeset 326 386566f263f3
parent 295 bc6fc07c3153
child 426 3f285782ac9b
equal deleted inserted replaced
325:f2604900bf25 326:386566f263f3
    43 
    43 
    44         wx.TextCtrl.__init__(self, parent, **therest)
    44         wx.TextCtrl.__init__(self, parent, **therest)
    45 
    45 
    46         #Some variables
    46         #Some variables
    47         self._dropDownClick = dropDownClick
    47         self._dropDownClick = dropDownClick
    48         self._lastinsertionpoint = 0
    48         self._lastinsertionpoint = None
    49         
    49         
    50         self._screenheight = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y)
    50         self._screenheight = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y)
    51         self.element_path = element_path
    51         self.element_path = element_path
    52         
    52         
    53         #widgets
    53         #widgets
   122         event.Skip()
   122         event.Skip()
   123 
   123 
   124     def onClickToggleUp(self, event):
   124     def onClickToggleUp(self, event):
   125         if self.GetInsertionPoint() == self._lastinsertionpoint:
   125         if self.GetInsertionPoint() == self._lastinsertionpoint:
   126             self._showDropDown(not self.dropdown.IsShown())
   126             self._showDropDown(not self.dropdown.IsShown())
       
   127         self._lastinsertionpoint = None
   127         event.Skip()
   128         event.Skip()
   128 
   129 
   129     def onControlChanged(self, event):
   130     def onControlChanged(self, event):
   130         res = self.GetValue()
   131         res = self.GetValue()
   131         config = wx.ConfigBase.Get()
   132         config = wx.ConfigBase.Get()