wxPython/wxGlade-0.9.1/widgets/custom_widget/custom_widget.py
def xml_builder(attrs, parent, sizer, sizeritem, pos=None):
    "factory to build CustomWidget objects from a XML file"
    from xml_parse import XmlParsingError
    try:
        name = attrs['name']
    except KeyError:
        raise XmlParsingError(_("'name' attribute missing"))
    if not sizer or not sizeritem:
        raise XmlParsingError(_("sizer or sizeritem object cannot be None"))
    klass = attrs.get("class", "CustomWidget")
    win = CustomWidget(name, klass, parent, wx.NewId(), sizer, pos)
    #sizer.set_item(win.pos, proportion=sizeritem.proportion, span=sizeritem.span, flag=sizeritem.flag, border=sizeritem.border)
    node = Node(win)
    win.node = node
    if pos is None: common.app_tree.add(node, sizer.node)
    else: common.app_tree.insert(node, sizer.node, pos-1)
    return win
factory to build CustomWidget objects from a XML file
factory to build CustomWidget objects from a XML file
factory to build CustomWidget objects from a XML file
def xml_builder(attrs, parent, sizer, sizeritem, pos=None):
    from xml_parse import XmlParsingError
    try:
        name = attrs['name']
    except KeyError:
        raise XmlParsingError(_("'name' attribute missing"))
    if not sizer or not sizeritem:
        raise XmlParsingError(_("sizer or sizeritem object cannot be None"))
    klass = attrs.get("class", "CustomWidget")
    win = CustomWidget(name, klass, parent, wx.NewId(), sizer, pos)
    node = Node(win)
    win.node = node
    if pos is None: common.app_tree.add(node, sizer.node)
    else: common.app_tree.insert(node, sizer.node, pos-1)
    return win
def xml_builder ( attrs , parent , sizer , sizeritem , pos = None ) : from xml_parse import XmlParsingError try : name = attrs [ 'name' ] except KeyError : raise XmlParsingError ( _ ( "'name' attribute missing" ) ) if not sizer or not sizeritem : raise XmlParsingError ( _ ( "sizer or sizeritem object cannot be None" ) ) klass = attrs . get ( "class" , "CustomWidget" ) win = CustomWidget ( name , klass , parent , wx . NewId ( ) , sizer , pos ) node = Node ( win ) win . node = node if pos is None : common . app_tree . add ( node , sizer . node ) else : common . app_tree . insert ( node , sizer . node , pos - 1 ) return win
factory to build CustomWidget objects from a XML file
factory to build CustomWidget objects from a XML file
"factory to build CustomWidget objects from a XML file" #sizer.set_item(win.pos, proportion=sizeritem.proportion, span=sizeritem.span, flag=sizeritem.flag, border=sizeritem.border)
attrs
parent
sizer
sizeritem
pos