#NEWLINE# def popup_menu( self , control ) : #NEWLINE# #INDENT# ' Displays the list editor popup menu.\n        ' #NEWLINE# self . _cur_control = control #NEWLINE# control . SetFocus ( ) #NEWLINE# proxy = control . proxy #NEWLINE# index = proxy . index #NEWLINE# menu = MakeMenu ( self . list_menu , self , True , self . control ) . menu #NEWLINE# len_list = len ( proxy . list ) #NEWLINE# not_full = ( len_list < self . _trait_handler . maxlen ) #NEWLINE# self . _menu_before . enabled ( not_full ) #NEWLINE# self . _menu_after . enabled ( not_full ) #NEWLINE# self . _menu_delete . enabled ( ( len_list > self . _trait_handler . minlen ) ) #NEWLINE# self . _menu_up . enabled ( ( index > 0 ) ) #NEWLINE# self . _menu_top . enabled ( ( index > 0 ) ) #NEWLINE# self . _menu_down . enabled ( ( index < ( len_list - 1 ) ) ) #NEWLINE# self . _menu_bottom . enabled ( ( index < ( len_list - 1 ) ) ) #NEWLINE# self . control . PopupMenu ( menu , control . GetPosition ( ) ) #NEWLINE# menu . Destroy ( )