cca
changeset 59:9a80d2c6acbf
change of button, fix#7
author | Ilia |
---|---|
date | Thu, 09 Dec 2010 00:18:19 +0300 |
parents | dd3e42d72f44 |
children | f9244666211a |
files | Interface.py |
diffstat | 1 files changed, 24 insertions(+), 25 deletions(-) [+] |
line diff
1.1 --- a/Interface.py Wed Dec 08 02:33:39 2010 +0300 1.2 +++ b/Interface.py Thu Dec 09 00:18:19 2010 +0300 1.3 @@ -399,21 +399,22 @@ 1.4 scrollbar.config(command=state_list.yview) 1.5 list_frame.pack(side="top") 1.6 1.7 -up = Button(automata_window, text="Up", command=handlers.upwards) 1.8 -up.config(bg="red") 1.9 -down = Button(automata_window, text="Down", command=handlers.downwards) 1.10 -down.config(bg="orange") 1.11 -to_top = Button(automata_window, text="To Top", command=handlers.to_top) 1.12 -to_top.config(bg="yellow") 1.13 -to_bottom = Button(automata_window, text="To Bottom", command=handlers.to_bottom) 1.14 -to_bottom.config(bg="green") 1.15 -delete = Button(automata_window, text="Delete", command=handlers.delete_state) 1.16 -delete.config(bg="cyan") 1.17 -up.pack(side="top", fill="x") 1.18 -down.pack(side="top", fill="x") 1.19 -to_top.pack(side="top", fill="x") 1.20 -to_bottom.pack(side="top", fill="x") 1.21 -delete.pack(side="top", fill="x") 1.22 +manip_frame1 = Frame(automata_window, padx=10, pady=5) 1.23 +up = Button(manip_frame1, text="Up", command=handlers.upwards, width=10) 1.24 +to_top = Button(manip_frame1, text="To Top", command=handlers.to_top, width=10) 1.25 +up.pack(side="left", fill="x") 1.26 +to_top.pack(side="right", fill="x") 1.27 +manip_frame1.pack(side="top", fill="x") 1.28 + 1.29 +manip_frame2 = Frame(automata_window, padx=10, pady=5) 1.30 +down = Button(manip_frame2, text="Down", command=handlers.downwards, width=10) 1.31 +to_bottom = Button(manip_frame2, text="To Bottom", command=handlers.to_bottom, width=10) 1.32 +down.pack(side="left", fill="x") 1.33 +to_bottom.pack(side="right", fill="x") 1.34 +manip_frame2.pack(side="top", fill="x") 1.35 + 1.36 +delete = Button(automata_window, text="Delete", command=handlers.delete_state, width=10) 1.37 +delete.pack(side="top") 1.38 1.39 1.40 information = Label(automata_window, text= "Information of State") 1.41 @@ -470,12 +471,12 @@ 1.42 condition_frame.pack(side="top") 1.43 1.44 1.45 -add_state = Button(automata_window, text="Add", command=handlers.add) 1.46 -add_state.config(bg="blue") 1.47 -change_state = Button(automata_window, text="Change", command=handlers.change) 1.48 -change_state.config(bg="violet") 1.49 -add_state.pack(side="top", fill="x") 1.50 -change_state.pack(side="top", fill="x") 1.51 +add_frame = Frame(automata_window, padx=10, pady=5) 1.52 +add_state = Button(add_frame, text="Add", command=handlers.add, width=10) 1.53 +change_state = Button(add_frame, text="Change", command=handlers.change, width=10) 1.54 +add_state.pack(side="left", fill="x") 1.55 +change_state.pack(side="right", fill="x") 1.56 +add_frame.pack(side="top", fill="x") 1.57 1.58 error=Label(automata_window) 1.59 error.pack(side="top", fill="x") 1.60 @@ -523,11 +524,9 @@ 1.61 expansion.pack(side="top") 1.62 Label(size_window).pack(side="top", fill="x") 1.63 apply_frame = Frame(size_window, padx=10, pady=5) 1.64 -apply_size = Button(apply_frame, text="Apply") 1.65 -apply_size.config(bg="yellow") 1.66 +apply_size = Button(apply_frame, text="Apply", width=6) 1.67 apply_size.pack(side="left", fill="x") 1.68 -close_size = Button(apply_frame, text="Close", command=handlers.hide_size_window) 1.69 -close_size.config(bg="green") 1.70 +close_size = Button(apply_frame, text="Close", command=handlers.hide_size_window, width=6) 1.71 close_size.pack(side="right", fill="x") 1.72 apply_frame.pack(side="top", fill="x") 1.73