def new_button(self):
a_caption = 'Button' + '{:02d}'.format(self.count_objs)
self.count_objs += 1
mypage.unibutton((40, 80, 80, 40, a_caption))
a_button = mypage.unibuttons [-1]
a_button.color = a_button.background_color
if mypage.kivy:
a_button.bind(on_touch_move=self.touch_move)
a_button.bind(on_touch_down=self.touch_down)
else:
a_button.touch_enabled = False
a_button.color = a_button.background_color
a_button.pos = (a_button.x, a_button.y)
self.new_objs.append(a_button)
评论列表
文章目录