assemble.py 文件源码

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

项目:AssembleAudio 作者: The-White-Wolf 项目源码 文件源码
def create_grid(self, x_hint_list, rows_to_create):
        #x_hint_list is a list of ints, relating to the intended
        #width of each column in the grid.

        for row in range(rows_to_create):
            for x_hint in x_hint_list:
                grid_button = Button(text = '', valign = 'middle', shorten = True, size_hint_y = None,
                    height = 30,  size_hint_x = x_hint, background_color = cfg_primary_neutral,
                    background_normal = '', color = cfg_primary_dark)

                grid_button.bind(size=grid_button.setter('text_size'))
                grid_button.bind(on_touch_down=self.button_press)
                self.add_widget(grid_button)
        self._avail += rows_to_create
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号