vl. durch ein attribut oder eine funktion?
oder muss man es dafür immer wieder zerstören und neu aufbauen??

danke im voraus und liebe grüße
hannes
Code: Alles auswählen
from visual import *
from Tkinter import *
r = ring(pos=(1,1,1), axis=(0,1,0), radius=0.5, thickness=0.1)
def confi(event = None):
r.radius = 1+int(sc.get())
print r.radius
if r.visible == 0:
r.visible = 1
else: r.visible = 0
root = Tk()
sc = Scale(root, to = 3, command = confi)
sc.pack()
mainloop()
Code: Alles auswählen
myFrame = Frame(root); myFrame.visible = 0
Code: Alles auswählen
from Tkinter import *
def hide():
main.geometry("200x300")
window_one.pack_forget()
window_two.pack()
def show():
main.geometry("200x300")
window_one.pack()
window_two.pack_forget()
main = Tk()
main.title("Hide")
main.resizable(0,0)
main.geometry("200x300")
window_one=Frame(main,width="200",height="300",bg="black")
info=Label(window_one,width="200",height="120",bg="black",
fg="green",
text="Beispiel wie man ein Frame versteckt \nindem man mit \n pack_forget()\n das Widget versteckt").pack()
window_one.pack()
window_two=Frame(main,width="200",height="300",bg="white",cursor="X_cursor")
info=Label(window_two,width="200",height="120",bg="white",
fg="black",
text="Man sieht, es klappt...").pack()
window_two.pack()
hide=Button(text="hide",command=hide,bg="green",fg="black").place(x=50,y=10)
show=Button(text="show",command=show,bg="green",fg="black").place(x=120,y=10)
main.mainloop()