tintwizard.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:tintwizard 作者: vanadey 项目源码 文件源码
def createComboBox(parent, choices=["null"], active=0, gridX=0, gridY=0, sizeX=1, sizeY=1, xExpand=True, yExpand=True, handler=None):
    """Creates a combo box with text choices and adds it to a parent widget."""
    temp = gtk.combo_box_new_text()

    for choice in choices:
        temp.append_text(choice)

    temp.set_active(active)

    if handler != None:
        temp.connect("changed", handler)

    parent.attach(temp, gridX, gridX+sizeX, gridY, gridY+sizeY, xoptions=gtk.EXPAND if xExpand else 0, yoptions=gtk.EXPAND if yExpand else 0)

    return temp
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号