


Ich kann euch gar nicht sagen, wie sehr mich das freut!!

VIELEN VIELEN VIELEN VIELEN Dank an Euch alle!!
Nun werde ich weiterschreiben am Programm...
Grüße, HTLEst.
Code: Alles auswählen
def plot(stelle1, stelle2, stelle3, alpha, panel):
# --------------Umrechnen der Eingaben------------------------------------------
alpha = alpha*math.pi/180
f=stelle1/100.
xf=stelle2/10.
d=stelle3/100.
usw.
Kein Problem:HTLEisenstadt hat geschrieben:Ist es möglich, dass sich mehrere Fenster (in jedem Fenster ein Diagramm) gleichzeitig öffnen?
Code: Alles auswählen
#!/usr/bin/env python
# coding: UTF-8
try:
#~~ For Python 2.x
import Tkinter as tk
except ImportError:
#~~ For Python 3.x
import tkinter as tk
APP_WIN_XPOS = 50
APP_WIN_YPOS = 50
APP_WIN_WIDTH = 400
APP_WIN_HEIGHT = 400
APP_WIN_TITLE = 'Tk App-Template'
APP_BACK_GND = 'palegoldenrod'
class App(object):
def __init__(self):
self.win = tk.Tk()
self.win.geometry('+{0}+{1}'.format(APP_WIN_XPOS, APP_WIN_YPOS))
#self.win.geometry('{0}x{1}'.format(APP_WIN_WIDTH, APP_WIN_HEIGHT))
self.win.protocol("WM_DELETE_WINDOW", self.close)
self.win.config(bg=APP_BACK_GND)
def create_top_win(self):
top_win = tk.Toplevel()
top_win.geometry('{0}x{1}+{2}+{3}'.format(250, 100, self.top_win_xpos,
self.top_win_ypos))
top_win.update_idletasks()
self.top_win_collector.append(top_win)
self.top_win_xpos += self.top_win_xyoff
self.top_win_ypos += self.top_win_xyoff
top_win.title('Toplevel-Fenster-{0}'.format(len(self.top_win_collector)))
top_win.update_idletasks()
def close(self):
self.win.destroy()
print ("Shut down application")
def run(self):
self.win.mainloop()
app = App()
app.win.title("Toplevel-Generator")
app.win.withdraw()
app.top_win_xpos = 300
app.top_win_ypos = APP_WIN_YPOS
app.top_win_xyoff = 20
app.top_win_collector = list()
# Erstelle 10 Toplevel-Fenster
[app.create_top_win() for top_win in range(10)]
# Erstelle weitere Toplevel-Fenster
tk.Button(app.win, text='Erstelle weiteres Fester', command=app.create_top_win
).pack()
app.win.deiconify()
app.win.update_idletasks()
app.run()