|
@@ -6,20 +6,33 @@
|
|
|
#Modul importieren
|
|
|
import Tkinter as tk
|
|
|
import turtle
|
|
|
-#Fenster erstellen
|
|
|
-Rasenfenster = tk.Tk()
|
|
|
-Rasenfenster.title ("Roboter") #Fenstertitel
|
|
|
-Rasenfenster.geometry ('600x400') #Fenstergroesse
|
|
|
-Rasenfenster.configure (background = 'green') #Hintergrundfarbe
|
|
|
-Rasenfenster.mainloop()
|
|
|
|
|
|
-#Begrenzung (Frame)
|
|
|
+#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()
|
|
|
|
|
|
-#class Garten:
|
|
|
-# def __init__(self, Rasenfenster):
|
|
|
-# self.Ra
|
|
|
|
|
|
-Garten = tk.Frame(Rasenfenster, bd=2, relief="ridge")
|
|
|
-Garten.pack()
|
|
|
|
|
|
-#Rasenfenster.mainloop()
|