python中有什么办法让通过鼠标点击已显示的字符消失 还有让图片显示是draw.win 那消失是什么呢
展开全部
以在卖棚屏幕中央打印字符'慎棚click to clear', 点击消失为例
from graphics import *
def main():
win=GraphWin()
text=Text(Point(100,100),'click to clear'宽配则)
text.draw(win)
p = win.getMouse()
if 80<= p.getX() <= 120 and 90 <= p.getY() <=110:
text.undraw()
main()
from graphics import *
def main():
win=GraphWin()
text=Text(Point(100,100),'click to clear'宽配则)
text.draw(win)
p = win.getMouse()
if 80<= p.getX() <= 120 and 90 <= p.getY() <=110:
text.undraw()
main()
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询