#NEWLINE# def Create( self , parent , id , evtHandler ) : #NEWLINE# #INDENT# ' Called to create the control, which must derive from wxControl. ' #NEWLINE# if hasattr ( self , '_control' ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# handler = self . _handler #NEWLINE# if ( handler is None ) : #NEWLINE# #INDENT# handler = default_handler ( ) #NEWLINE# #UNINDENT# if ( self_width . _context is None ) : #NEWLINE# #INDENT# ui = UI ( handler = handler ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# context = self . _context . copy ( ) #NEWLINE# context [ 'table_editor_object' ] = context [ 'object' ] #NEWLINE# context [ 'object' ] = self . _obj #NEWLINE# ui = UI ( handler = handler , context = context ) #NEWLINE# #UNINDENT# factory = self . _factory #NEWLINE# if ( factory . _ui is not None ) : #NEWLINE# #INDENT# ui . history = factory . _ui . history #NEWLINE# #UNINDENT# factory . is_grid_cell = True #NEWLINE# factory_method = getattr ( factory , ( self . _style + '_editor' ) ) #NEWLINE# self . _editor = factory_method ( ui , self . _obj , self . _name , self . _description , parent ) #NEWLINE# self . _editor . prepare ( parent ) #NEWLINE# self . _control = control = self . _editor . control #NEWLINE# ( grid , row , col ) = getattr ( self , '_grid_info' , ( None , None , None ) ) #NEWLINE# ( width , height ) = control . GetBestSize ( ) #NEWLINE# self_height = self . _height #NEWLINE# if ( self_height > 1.0 ) : #NEWLINE# #INDENT# height = int ( self_height ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( self_height >= 0.0 ) and ( grid is not None ) ) : #NEWLINE# #INDENT# height = int ( ( self_height * grid . GetSize ( ) [ 1 ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# self_width = self . _width #NEWLINE# if ( self_width > 1.0 ) : #NEWLINE# #INDENT# width = int ( self_width ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( self_width >= 0.0 ) and ( grid is not None ) ) : #NEWLINE# #INDENT# width = int ( ( self_width * grid . GetSize ( ) [ 0 ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# ( self . _edit_width , self . _edit_height ) = ( width , height ) #NEWLINE# push_control ( control , grid ) #NEWLINE# control = get_control ( control ) #NEWLINE# if ( control is not None ) : #NEWLINE# #INDENT# self . SetControl ( control )