def new_label(self):
a_caption = 'Label' + '{:02d}'.format(self.count_objs)
self.count_objs += 1
mypage.unilabel((40, 240, 80, 20, a_caption))
a_label = mypage.unilabels [-1]
a_label.size_hint=(None,None)
a_label.height = 20;
if mypage.kivy:
a_label.background_color = a_label.color
a_label.bind(on_touch_down=self.touch_down)
a_label.bind(on_touch_move=self.touch_move)
else:
a_label.touch_enabled = False
a_label.pos = (a_label.x, a_label.y)
a_label.color = a_label.background_color
self.new_objs.append(a_label)
评论列表
文章目录