#NEWLINE# def open( self , widget ) : #NEWLINE# #INDENT# 'Open the dropdown list and attach it to a specific widget.\n        Depending on the position of the widget within the window and\n        the height of the dropdown, the dropdown might be above or below\n        that widget.\n        ' #NEWLINE# if ( self . attach_to is not None ) : #NEWLINE# #INDENT# self . dismiss ( ) #NEWLINE# #UNINDENT# self . _win = widget . get_parent_window ( ) #NEWLINE# if ( widget . _win is None ) : #NEWLINE# #INDENT# raise DropDownException ( 'Cannot open a dropdown list on a hidden widget' ) #NEWLINE# #UNINDENT# self . attach_to = widget #NEWLINE# widget . bind ( pos = self . _reposition , size = self . _reposition ) #NEWLINE# self . _reposition ( ) #NEWLINE# self . _win . add_widget ( self )