layers.py 文件源码

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

项目:samples-Python-RPS 作者: PMoureu 项目源码 文件源码
def __init__(self, itemlist):

        height = len(itemlist)*17
        self.Text = "Select the categories to export"
        self.Size = Size(300, height + 80)

        self.check = CheckedListBox()
        self.check.Parent = self
        self.check.Location = Point(5, 5)
        self.check.Size = Size(270, height)

        # load the list of relevant categories found in the project
        list_items = List[Object](itemlist)
        self.check.Items.AddRange(list_items.ToArray())
        self.check.CheckOnClick = True

        # set checked by default
        for i in range(len(itemlist)):
            self.check.SetItemChecked(i , True)

        okay = Button()
        okay.Parent = self
        okay.Text = 'OK'
        okay.Location = Point(50, height+10)
        okay.Width = 140
        okay.Click += self.onValidate

        cancel = Button()
        cancel.Parent = self
        cancel.Text = 'Cancel'
        cancel.Location = Point(okay.Right, height+10)
        cancel.Click += self.onCancel

        self.CenterToScreen()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号