controls/TextCtrlAutoComplete.py
changeset 1767 c74815729afd
parent 1745 f9d32913bad4
child 1771 f68a105000be
equal deleted inserted replaced
1766:c1e5b9f19483 1767:c74815729afd
    58             max_text_width = max(max_text_width, w)
    58             max_text_width = max(max_text_width, w)
    59             max_text_height = max(max_text_height, h)
    59             max_text_height = max(max_text_height, h)
    60 
    60 
    61         itemcount = min(len(choices), MAX_ITEM_SHOWN)
    61         itemcount = min(len(choices), MAX_ITEM_SHOWN)
    62         width = self.Parent.GetSize()[0]
    62         width = self.Parent.GetSize()[0]
    63         height = max_text_height * itemcount + \
    63         height = \
    64                  LISTBOX_INTERVAL_HEIGHT * max(0, itemcount - 1) + \
    64             max_text_height * itemcount + \
    65                  2 * LISTBOX_BORDER_HEIGHT
    65             LISTBOX_INTERVAL_HEIGHT * max(0, itemcount - 1) + \
       
    66             2 * LISTBOX_BORDER_HEIGHT
    66         if max_text_width + 10 > width:
    67         if max_text_width + 10 > width:
    67             height += 15
    68             height += 15
    68         size = wx.Size(width, height)
    69         size = wx.Size(width, height)
    69         if wx.Platform == '__WXMSW__':
    70         if wx.Platform == '__WXMSW__':
    70             size.width -= 2
    71             size.width -= 2