I was wondering how to hide my start button after being clicked so that If the user accidentally was clicker happy they wouldn't hit the button causing more bubbles to appear on screen. Below is a snippet of the coding using Python 3.3:
from tkinter import *import randomfrom tkinter.messagebox import showinfoclass BFrame:def __init__(self, root, name):self.name = nameroot.title("Math Bubbles")self.bubbles = {} # this will hold bubbles ids, positions and velocitiesself.score = 0Button(root, text="Start", width=8, bg="Pink", command=self.make_bubbles).pack() # This button starts the game, making the bubbles move across the screenButton(root, text="Quit", width=8, bg="Yellow",command=quit).pack()self.canvas = Canvas(root, width=800, height=650, bg='#afeeee')self.canvas.create_text(400, 30, fill="darkblue", font="Times 20 italic bold", text="Click the bubbles that are answers in the two times tables.")#Shows score at beginning of the gameself.current_score = self.canvas.create_text(200, 60, fill="darkblue", font="Times 15 italic bold", text="Your score is: 0")self.canvas.pack()def make_bubbles(self):for each_no in range(1, 21):xval = random.randint(5, 765)yval = random.randint(5, 615)COLOURS = ('#00ff7f', '#ffff00', '#ee82ee', '#ff69b4', '#fff0f5') # CAPS represents a constant variablecolour = random.choice(COLOURS) # This picks a colour randomlyoval_id = self.canvas.create_oval(xval, yval, xval + 60, yval + 60,fill=colour, outline="#000000", width=5, tags="bubble")text_id = self.canvas.create_text(xval + 30, yval + 30, text=each_no, tags="bubble")self.canvas.tag_bind("bubble", "<Button-1>", lambda x: self.click(x))self.bubbles[oval_id] = (xval, yval, 0, 0, each_no, text_id) # add bubbles to dictionarydef click(self, event):if self.canvas.find_withtag(CURRENT):item_uid = event.widget.find_closest(event.x, event.y)[0]is_even = Falsetry: # clicked ovalself.bubbles[item_uid]except KeyError: # clicked ovalfor key, value in self.bubbles.iteritems():if item_uid == value[5]: # comparing to text_idif value[4] % 2 == 0:is_even = Trueself.canvas.delete(key) # deleting ovalself.canvas.delete(item_uid) # deleting textelse:if self.bubbles[item_uid][4] % 2 == 0:is_even = Trueself.canvas.delete(item_uid) # deleting ovalself.canvas.delete(self.bubbles[item_uid][5]) # deleting textif is_even:self.score += 1else:self.score -= 1showinfo("Oh no!", "%s! You clicked the wrong bubble, please start again." % self.name)if self.score == 10:#Tells user You won! if score is 10showinfo("Winner", "You won %s!" % self.name)self.canvas.delete(self.current_score)#Shows updated score on canvasself.current_score = self.canvas.create_text(200, 60, fill="darkblue", font="Times 15 italic bold", text="Your score is: %s"%self.score)