Changeset 12:d316cee094dc
- Timestamp:
- 12/04/10 21:47:22 (5 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface.py
r10 r12 ˆà 177 177 to_bottom = Button(automata_frame, text="To Bottom", state="DISABLED")ˆà 178 178 to_bottom.config(bg="green")ˆà 179 ˆà delete = Button(automata_frame, text="Delete", command=callback, state="disabled")ˆàˆà 179 delete = Button(automata_frame, text="Delete", state="DISABLED")ˆà 180 180 delete.config(bg="cyan")ˆà 181 181 up.pack(side="top", fill="x")ˆà òÀæ òÀæ ˆà 237 237 ˆà 238 238 ˆà 239 ˆà add_state = Button(automata_frame, text="ADD", command=callback, state="disabled")ˆàˆà 239 add_state = Button(automata_frame, text="ADD", state="DISABLED")ˆà 240 240 add_state.config(bg="blue")ˆà 241 ˆà change_state = Button(automata_frame, text="Change", command=callback, state="disabled")ˆàˆà 241 change_state = Button(automata_frame, text="Change", state="DISABLED")ˆà 242 242 change_state.config(bg="violet")ˆà 243 243 add_state.pack(side="top", fill="x")ˆà òÀæ òÀæ ˆà 247 247 error.pack(side="top", fill="x")ˆà 248 248 ˆà ˆà 249 ˆà ˆà 250 side = 0ˆà ˆà 251 ˆà ˆà 252 size_window = Toplevel(root)ˆà ˆà 253 size_window.title("")ˆà ˆà 254 size_window.protocol("WM_DELETE_WINDOW", handlers.hide_size_window)ˆà ˆà 255 Label(size_window, text= "Current size of window:").pack(side="top", fill="x")ˆà ˆà 256 Label(size_window, text= "X x Y").pack(side="top", fill="x")ˆà ˆà 257 Label(size_window, text= "New size:").pack(side="top", fill="x")ˆà ˆà 258 new_size = Frame(size_window)ˆà ˆà 259 size_x = Entry(new_size, width=5)ˆà ˆà 260 size_x.grid(row=0, column=0)ˆà ˆà 261 Label(new_size, text=" x ").grid(row=0, column=1)ˆà ˆà 262 size_y = Entry(new_size, width=5)ˆà ˆà 263 size_y.grid(row=0, column=2)ˆà ˆà 264 new_size.pack(side="top")ˆà ˆà 265 Label(size_window, text= "Expansion of window:").pack(side="top", fill="x")ˆà ˆà 266 expansion = Frame(size_window)ˆà ˆà 267 r0 = Radiobutton(expansion, variable=side, value = 0, indicatoron=0, width=2, height=1)ˆà ˆà 268 r0.select()ˆà ˆà 269 r0.grid(row=0, column=0) ˆà ˆà 270 r1 = Radiobutton(expansion, variable=side, value = 1, indicatoron=0, width=2, height=1)ˆà ˆà 271 r1.grid(row=0, column=1) ˆà ˆà 272 r2 = Radiobutton(expansion, variable=side, value = 2, indicatoron=0, width=2, height=1)ˆà ˆà 273 r2.grid(row=0, column=2) ˆà ˆà 274 r3 = Radiobutton(expansion, variable=side, value = 3, indicatoron=0, width=2, height=1)ˆà ˆà 275 r3.grid(row=1, column=0) ˆà ˆà 276 r4 = Radiobutton(expansion, variable=side, value = 4, indicatoron=0, width=2, height=1)ˆà ˆà 277 r4.grid(row=1, column=1) ˆà ˆà 278 r5 = Radiobutton(expansion, variable=side, value = 5, indicatoron=0, width=2, height=1)ˆà ˆà 279 r5.grid(row=1, column=2) ˆà ˆà 280 r6 = Radiobutton(expansion, variable=side, value = 6, indicatoron=0, width=2, height=1)ˆà ˆà 281 r6.grid(row=2, column=0) ˆà ˆà 282 r7 = Radiobutton(expansion, variable=side, value = 7, indicatoron=0, width=2, height=1)ˆà ˆà 283 r7.grid(row=2, column=1) ˆà ˆà 284 r8 = Radiobutton(expansion, variable=side, value = 8, indicatoron=0, width=2, height=1)ˆà ˆà 285 r8.grid(row=2, column=2)ˆà ˆà 286 expansion.pack(side="top")ˆà ˆà 287 Label(size_window).pack(side="top", fill="x")ˆà ˆà 288 apply_frame = Frame(size_window, padx=10, pady=5)ˆà ˆà 289 apply_size = Button(apply_frame, text="Apply")ˆà ˆà 290 apply_size.config(bg="yellow")ˆà ˆà 291 apply_size.pack(side="left", fill="x")ˆà ˆà 292 close_size = Button(apply_frame, text="Close", command=handlers.hide_size_window)ˆà ˆà 293 close_size.config(bg="green")ˆà ˆà 294 close_size.pack(side="right", fill="x")ˆà ˆà 295 apply_frame.pack(side="top", fill="x")ˆà 249 296 ˆà 250 297 menubar = Menu(root)ˆà òÀæ òÀæ ˆà 263 310 menu_action.add_command(label="Stop", command=handlers.stop)ˆà 264 311 menu_action.add_command(label="Next Step", command=handlers.next_step)ˆà ˆà 312 menu_action.add_separator()ˆà 265 313 menu_action.add_command(label="Increase speed", command=handlers.faster)ˆà 266 314 menu_action.add_command(label="Decrease speed", command=handlers.slower)ˆà ˆà 315 menu_action.add_separator()ˆà 267 316 menu_action.add_command(label="Zoom In", command=handlers.zoom_in)ˆà 268 317 menu_action.add_command(label="Zoom Out", command=handlers.zoom_out)ˆà ˆà 318 menu_action.add_separator()ˆà 269 319 menu_action.add_command(label="Clean field")ˆà 270 320 menu_action.add_command(label="Fill randomly")ˆà ˆà 321 menu_action.add_command(label="Change size",command=handlers.show_size_window)ˆà 271 322 menubar.add_cascade(label="Action", menu=menu_action)ˆà 272 323 ˆà 273 324 menubar.add_command(label="Automata", command=handlers.automata_frame)ˆà 274 325 ˆà 275 ˆà menubar.add_command(label="Help" )ˆàˆà 326 menubar.add_command(label="Help", command=handlers.help)ˆà 276 327 ˆà 277 328 root.mainloop()ˆà
Note: See TracChangeset
for help on using the changeset viewer.