mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Modernize turtledemo with conditional expressions; remove duplicate line.
This commit is contained in:
parent
e3416e6138
commit
8b95d5e0bf
1 changed files with 6 additions and 19 deletions
|
|
@ -127,25 +127,12 @@ def makeGraphFrame(self, root):
|
|||
def configGUI(self, menu, start, stop, clear, txt="", color="blue"):
|
||||
self.ExamplesBtn.config(state=menu)
|
||||
|
||||
self.start_btn.config(state=start)
|
||||
if start == NORMAL:
|
||||
self.start_btn.config(bg="#d00")
|
||||
else:
|
||||
self.start_btn.config(bg="#fca")
|
||||
|
||||
self.stop_btn.config(state=stop)
|
||||
if stop == NORMAL:
|
||||
self.stop_btn.config(bg="#d00")
|
||||
else:
|
||||
self.stop_btn.config(bg="#fca")
|
||||
self.clear_btn.config(state=clear)
|
||||
|
||||
self.clear_btn.config(state=clear)
|
||||
if clear == NORMAL:
|
||||
self.clear_btn.config(bg="#d00")
|
||||
else:
|
||||
self.clear_btn.config(bg="#fca")
|
||||
|
||||
self.start_btn.config(state=start,
|
||||
bg="#d00" if start == NORMAL else "#fca")
|
||||
self.stop_btn.config(state=stop,
|
||||
bg="#d00" if stop == NORMAL else "#fca")
|
||||
self.clear_btn.config(state=clear,
|
||||
bg="#d00" if clear == NORMAL else"#fca")
|
||||
self.output_lbl.config(text=txt, fg=color)
|
||||
|
||||
def makeLoadDemoMenu(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue