Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://kodomo.fbb.msu.ru/trac/cca/changeset/12%3Ad316cee094dc
Äàòà èçìåíåíèÿ: Unknown
Äàòà èíäåêñèðîâàíèÿ: Sun Apr 10 09:18:18 2016
Êîäèðîâêà: IBM-866
Changeset 12:d316cee094dc òÀÓ Cyclyc Cell Automata

Changeset 12:d316cee094dc


Ignore:
Timestamp:
12/04/10 21:47:22 (5 years ago)
Author:
Ilia
Branch:
default
Message:

added size_window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface.py

    r10 r12 ˆà
    177177to_bottom = Button(automata_frame, text="To Bottom", state="DISABLED")ˆà
    178178to_bottom.config(bg="green")ˆà
    179ˆàdelete = Button(automata_frame, text="Delete", command=callback, state="disabled")ˆà
    ˆà179delete = Button(automata_frame, text="Delete", state="DISABLED")ˆà
    180180delete.config(bg="cyan")ˆà
    181181up.pack(side="top", fill="x")ˆà
    òÀæ òÀæ ˆà
    237237ˆà
    238238ˆà
    239ˆàadd_state = Button(automata_frame, text="ADD", command=callback, state="disabled")ˆà
    ˆà239add_state = Button(automata_frame, text="ADD", state="DISABLED")ˆà
    240240add_state.config(bg="blue")ˆà
    241ˆàchange_state = Button(automata_frame, text="Change", command=callback, state="disabled")ˆà
    ˆà241change_state = Button(automata_frame, text="Change", state="DISABLED")ˆà
    242242change_state.config(bg="violet")ˆà
    243243add_state.pack(side="top", fill="x")ˆà
    òÀæ òÀæ ˆà
    247247error.pack(side="top", fill="x")ˆà
    248248ˆà
    ˆà249ˆà
    ˆà250side = 0ˆà
    ˆà251ˆà
    ˆà252size_window = Toplevel(root)ˆà
    ˆà253size_window.title("")ˆà
    ˆà254size_window.protocol("WM_DELETE_WINDOW", handlers.hide_size_window)ˆà
    ˆà255Label(size_window, text= "Current size of window:").pack(side="top", fill="x")ˆà
    ˆà256Label(size_window, text= "X x Y").pack(side="top", fill="x")ˆà
    ˆà257Label(size_window, text= "New size:").pack(side="top", fill="x")ˆà
    ˆà258new_size = Frame(size_window)ˆà
    ˆà259size_x = Entry(new_size, width=5)ˆà
    ˆà260size_x.grid(row=0, column=0)ˆà
    ˆà261Label(new_size, text=" x ").grid(row=0, column=1)ˆà
    ˆà262size_y = Entry(new_size, width=5)ˆà
    ˆà263size_y.grid(row=0, column=2)ˆà
    ˆà264new_size.pack(side="top")ˆà
    ˆà265Label(size_window, text= "Expansion of window:").pack(side="top", fill="x")ˆà
    ˆà266expansion = Frame(size_window)ˆà
    ˆà267r0 = Radiobutton(expansion, variable=side, value = 0, indicatoron=0, width=2, height=1)ˆà
    ˆà268r0.select()ˆà
    ˆà269r0.grid(row=0, column=0)    ˆà
    ˆà270r1 = Radiobutton(expansion, variable=side, value = 1, indicatoron=0, width=2, height=1)ˆà
    ˆà271r1.grid(row=0, column=1)    ˆà
    ˆà272r2 = Radiobutton(expansion, variable=side, value = 2, indicatoron=0, width=2, height=1)ˆà
    ˆà273r2.grid(row=0, column=2)    ˆà
    ˆà274r3 = Radiobutton(expansion, variable=side, value = 3, indicatoron=0, width=2, height=1)ˆà
    ˆà275r3.grid(row=1, column=0)    ˆà
    ˆà276r4 = Radiobutton(expansion, variable=side, value = 4, indicatoron=0, width=2, height=1)ˆà
    ˆà277r4.grid(row=1, column=1)    ˆà
    ˆà278r5 = Radiobutton(expansion, variable=side, value = 5, indicatoron=0, width=2, height=1)ˆà
    ˆà279r5.grid(row=1, column=2)    ˆà
    ˆà280r6 = Radiobutton(expansion, variable=side, value = 6, indicatoron=0, width=2, height=1)ˆà
    ˆà281r6.grid(row=2, column=0)    ˆà
    ˆà282r7 = Radiobutton(expansion, variable=side, value = 7, indicatoron=0, width=2, height=1)ˆà
    ˆà283r7.grid(row=2, column=1)    ˆà
    ˆà284r8 = Radiobutton(expansion, variable=side, value = 8, indicatoron=0, width=2, height=1)ˆà
    ˆà285r8.grid(row=2, column=2)ˆà
    ˆà286expansion.pack(side="top")ˆà
    ˆà287Label(size_window).pack(side="top", fill="x")ˆà
    ˆà288apply_frame = Frame(size_window, padx=10, pady=5)ˆà
    ˆà289apply_size = Button(apply_frame, text="Apply")ˆà
    ˆà290apply_size.config(bg="yellow")ˆà
    ˆà291apply_size.pack(side="left", fill="x")ˆà
    ˆà292close_size = Button(apply_frame, text="Close", command=handlers.hide_size_window)ˆà
    ˆà293close_size.config(bg="green")ˆà
    ˆà294close_size.pack(side="right", fill="x")ˆà
    ˆà295apply_frame.pack(side="top", fill="x")ˆà
    249296ˆà
    250297menubar = Menu(root)ˆà
    òÀæ òÀæ ˆà
    263310menu_action.add_command(label="Stop", command=handlers.stop)ˆà
    264311menu_action.add_command(label="Next Step", command=handlers.next_step)ˆà
    ˆà312menu_action.add_separator()ˆà
    265313menu_action.add_command(label="Increase speed", command=handlers.faster)ˆà
    266314menu_action.add_command(label="Decrease speed", command=handlers.slower)ˆà
    ˆà315menu_action.add_separator()ˆà
    267316menu_action.add_command(label="Zoom In", command=handlers.zoom_in)ˆà
    268317menu_action.add_command(label="Zoom Out", command=handlers.zoom_out)ˆà
    ˆà318menu_action.add_separator()ˆà
    269319menu_action.add_command(label="Clean field")ˆà
    270320menu_action.add_command(label="Fill randomly")ˆà
    ˆà321menu_action.add_command(label="Change size",command=handlers.show_size_window)ˆà
    271322menubar.add_cascade(label="Action", menu=menu_action)ˆà
    272323ˆà
    273324menubar.add_command(label="Automata", command=handlers.automata_frame)ˆà
    274325ˆà
    275ˆàmenubar.add_command(label="Help")ˆà
    ˆà326menubar.add_command(label="Help", command=handlers.help)ˆà
    276327ˆà
    277328root.mainloop()ˆà
Note: See TracChangeset for help on using the changeset viewer.