#NEWLINE# def append( self , value , key = '' ) : #NEWLINE# #INDENT# 'It allows to add child widgets to this.\n        The key allows to access the specific child in this way widget.children[key].\n        The key have to be numeric and determines the children order in the layout.\n\n        Args:\n            value (Widget): Child instance to be appended.\n            key (int): Unique identifier for the child. It have to be integer, and the value determines the order in the layout\n        ' #NEWLINE# key = str ( key ) #NEWLINE# if ( not isinstance ( value , Widget ) ) : #NEWLINE# #INDENT# raise ValueError ( 'value should be a Widget (otherwise use add_child(key,other)' ) #NEWLINE# #UNINDENT# if ( 'left' in value . style . keys ( ) ) : #NEWLINE# #INDENT# del value . style [ 'left' ] #NEWLINE# #UNINDENT# if ( 'right' in value . style . keys ( ) ) : #NEWLINE# #INDENT# del value . style [ 'right' ] #NEWLINE# #UNINDENT# value . style [ 'position' ] = 'static' #NEWLINE# value . style [ '-webkit-order' ] = '-1' #NEWLINE# value . style [ 'order' ] = '-1' #NEWLINE# key = ( str ( id ( value ) ) if ( key == '' ) else key ) #NEWLINE# self . add_child ( key , value ) #NEWLINE# if ( self . layout_orientation == Widget . LAYOUT_HORIZONTAL ) : #NEWLINE# #INDENT# if ( 'float' in self . children [ key ] . style . keys ( ) ) : #NEWLINE# #INDENT# if ( not ( self . children [ key ] . style [ 'float' ] == 'none' ) ) : #NEWLINE# #INDENT# self . children [ key ] . style [ 'float' ] = 'left' #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . children [ key ] . style [ 'float' ] = 'left' #NEWLINE# #UNINDENT# #UNINDENT# return key