Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/cca/raw-rev/9a80d2c6acbf
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 04:16:57 2012
Кодировка:

# HG changeset patch
# User Ilia
# Date 1291843099 -10800
# Node ID 9a80d2c6acbfc40dbf10416ee117b6f70c3cbdff
# Parent dd3e42d72f44bb1cbe377e2ad161e9851c73ac73
change of button, fix#7

diff -r dd3e42d72f44 -r 9a80d2c6acbf Interface.py
--- a/Interface.py Wed Dec 08 02:33:39 2010 +0300
+++ b/Interface.py Thu Dec 09 00:18:19 2010 +0300
@@ -399,21 +399,22 @@
scrollbar.config(command=state_list.yview)
list_frame.pack(side="top")

-up = Button(automata_window, text="Up", command=handlers.upwards)
-up.config(bg="red")
-down = Button(automata_window, text="Down", command=handlers.downwards)
-down.config(bg="orange")
-to_top = Button(automata_window, text="To Top", command=handlers.to_top)
-to_top.config(bg="yellow")
-to_bottom = Button(automata_window, text="To Bottom", command=handlers.to_bottom)
-to_bottom.config(bg="green")
-delete = Button(automata_window, text="Delete", command=handlers.delete_state)
-delete.config(bg="cyan")
-up.pack(side="top", fill="x")
-down.pack(side="top", fill="x")
-to_top.pack(side="top", fill="x")
-to_bottom.pack(side="top", fill="x")
-delete.pack(side="top", fill="x")
+manip_frame1 = Frame(automata_window, padx=10, pady=5)
+up = Button(manip_frame1, text="Up", command=handlers.upwards, width=10)
+to_top = Button(manip_frame1, text="To Top", command=handlers.to_top, width=10)
+up.pack(side="left", fill="x")
+to_top.pack(side="right", fill="x")
+manip_frame1.pack(side="top", fill="x")
+
+manip_frame2 = Frame(automata_window, padx=10, pady=5)
+down = Button(manip_frame2, text="Down", command=handlers.downwards, width=10)
+to_bottom = Button(manip_frame2, text="To Bottom", command=handlers.to_bottom, width=10)
+down.pack(side="left", fill="x")
+to_bottom.pack(side="right", fill="x")
+manip_frame2.pack(side="top", fill="x")
+
+delete = Button(automata_window, text="Delete", command=handlers.delete_state, width=10)
+delete.pack(side="top")


information = Label(automata_window, text= "Information of State")
@@ -470,12 +471,12 @@
condition_frame.pack(side="top")


-add_state = Button(automata_window, text="Add", command=handlers.add)
-add_state.config(bg="blue")
-change_state = Button(automata_window, text="Change", command=handlers.change)
-change_state.config(bg="violet")
-add_state.pack(side="top", fill="x")
-change_state.pack(side="top", fill="x")
+add_frame = Frame(automata_window, padx=10, pady=5)
+add_state = Button(add_frame, text="Add", command=handlers.add, width=10)
+change_state = Button(add_frame, text="Change", command=handlers.change, width=10)
+add_state.pack(side="left", fill="x")
+change_state.pack(side="right", fill="x")
+add_frame.pack(side="top", fill="x")

error=Label(automata_window)
error.pack(side="top", fill="x")
@@ -523,11 +524,9 @@
expansion.pack(side="top")
Label(size_window).pack(side="top", fill="x")
apply_frame = Frame(size_window, padx=10, pady=5)
-apply_size = Button(apply_frame, text="Apply")
-apply_size.config(bg="yellow")
+apply_size = Button(apply_frame, text="Apply", width=6)
apply_size.pack(side="left", fill="x")
-close_size = Button(apply_frame, text="Close", command=handlers.hide_size_window)
-close_size.config(bg="green")
+close_size = Button(apply_frame, text="Close", command=handlers.hide_size_window, width=6)
close_size.pack(side="right", fill="x")
apply_frame.pack(side="top", fill="x")