运行前准备好参与抽奖的好汉名单,本程序会自动读取表格文件,将待抽奖的各位好汉展示在左侧奖池中,只要点击图中小鹿的红鼻子,会默认抽取三等奖(共十位)。
?...= ImageTk.PhotoImage(self.image)
self.canvas.create_image(680, 350, image=self.im) # 使用create_image将图片添加到...(self.root,height=5,font=myFont,bg="lemonchiffon",bd=0,fg="olive")
# 将展示组件添加到界面中
self.target_1.place(...tkinter.Button(self.root, text = '重启', command = self.reset ,bg='gold')
# 重启按钮添加到界面中
self.btn_reset.place...所有用来替换 Button 组件的 Label 图片如上:
nose.png 即红鼻子局部图,对应 “开始/停止”;
001.png 即 1 号金标图,对应 “一等奖”;
002.png 即 2 号银标图