controls/TextCtrlAutoComplete.py
changeset 1745 f9d32913bad4
parent 1736 7e61baa047f0
child 1767 c74815729afd
equal deleted inserted replaced
1744:69dfdb26f600 1745:f9d32913bad4
    38 class PopupWithListbox(wx.PopupWindow):
    38 class PopupWithListbox(wx.PopupWindow):
    39 
    39 
    40     def __init__(self, parent, choices=[]):
    40     def __init__(self, parent, choices=[]):
    41         wx.PopupWindow.__init__(self, parent, wx.BORDER_SIMPLE)
    41         wx.PopupWindow.__init__(self, parent, wx.BORDER_SIMPLE)
    42 
    42 
    43         self.ListBox = wx.ListBox(self, -1, style=wx.LB_HSCROLL|wx.LB_SINGLE|wx.LB_SORT)
    43         self.ListBox = wx.ListBox(self, -1, style=wx.LB_HSCROLL | wx.LB_SINGLE | wx.LB_SORT)
    44 
    44 
    45         self.SetChoices(choices)
    45         self.SetChoices(choices)
    46 
    46 
    47         self.ListBox.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
    47         self.ListBox.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
    48         self.ListBox.Bind(wx.EVT_MOTION, self.OnMotion)
    48         self.ListBox.Bind(wx.EVT_MOTION, self.OnMotion)