1234567891011121314151617181920212223242526272829303132333435363738 |
- #14.06.2018
- #Linda Napieralski
- #Andre Giesbrecht
- #Alexa Tschernitschek
- #Modul importieren
- import Tkinter as tk
- import turtle
- #Hauptfenster erstellen
- Hauptfenster = tk.Tk()
- Hauptfenster.title ("Roboter") #Fenstertitel
- cv = tk.Canvas(Hauptfenster, width=600, height=600, background= "white") #canvas=Zeichenflaeche
- cv.pack(side = tk.LEFT) #Zeichenflaeche links positionieren
- #Turtle_Fenster = Rasenfenster (gruen) erzeugen
- t = turtle.RawTurtle(cv)
- screen = t.getscreen()
- screen.setworldcoordinates(0,0,400,400)
- screen.bgcolor("green") #Hintergrundfarbe gruen
- #Frame auf der Rechten Seite
- frame= tk.Frame(Hauptfenster)
- frame.pack(side= tk.RIGHT, fill=tk.BOTH)
- pointLabel = tk.Label(frame,width = 50, height= 10)
- pointLabel.pack()
- button= tk.Button(frame)
- button ["text"] = "Start"
- button ["background"] = "blue"
- button.pack()
- Hauptfenster.mainloop()
|