質問編集履歴
5
ソースを'''で囲みました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
### 該当のソースコード
|
32
32
|
|
33
|
-
|
33
|
+
```Python
|
34
34
|
|
35
35
|
import os
|
36
36
|
|
@@ -42,9 +42,9 @@
|
|
42
42
|
|
43
43
|
|
44
44
|
|
45
|
-
|
45
|
+
#=-=-=-GUI-=-=-=
|
46
|
-
|
46
|
+
|
47
|
-
|
47
|
+
#Create Instance
|
48
48
|
|
49
49
|
win = tk.Tk()
|
50
50
|
|
@@ -64,7 +64,7 @@
|
|
64
64
|
|
65
65
|
|
66
66
|
|
67
|
-
|
67
|
+
#----Frames | 枠組----
|
68
68
|
|
69
69
|
FrameOne = tk.LabelFrame(win, text="Input Settings", fg="white", bg="#52514F", padx="20", pady="10")
|
70
70
|
|
@@ -74,9 +74,9 @@
|
|
74
74
|
|
75
75
|
|
76
76
|
|
77
|
-
|
77
|
+
#--Widgets | 特徴----
|
78
|
-
|
78
|
+
|
79
|
-
|
79
|
+
#Input Widgets | 入力
|
80
80
|
|
81
81
|
Text_Input_Path = tk.Label(FrameOne, text="Input Path", fg="white", bg="#52514F", font=('Helvetica', 10))
|
82
82
|
|
@@ -86,7 +86,7 @@
|
|
86
86
|
|
87
87
|
|
88
88
|
|
89
|
-
|
89
|
+
#Output Widgets | 出力
|
90
90
|
|
91
91
|
Text_Output_Path = tk.Label(FrameTwo, text="Output Path", fg="white", bg="#52514F", font=('Helvetica', 10))
|
92
92
|
|
@@ -100,21 +100,23 @@
|
|
100
100
|
|
101
101
|
Extension_Value = tk.StringVar()
|
102
102
|
|
103
|
-
Extension_Value.set(".MOV")
|
103
|
+
Extension_Value.set(".MOV") #' default value as MOV | デフォルトMOV
|
104
|
-
|
104
|
+
|
105
|
+
|
106
|
+
|
105
|
-
|
107
|
+
3Extension_Option = tk.OptionMenu(FrameTwo, Extension_Value)#
|
106
108
|
|
107
109
|
"""Extension_Option.config(bg='#52514F', font=('Helvetica', 10), pady='2')"""
|
108
110
|
|
109
111
|
|
110
112
|
|
111
|
-
|
113
|
+
#Preview Widgets | プレビュー
|
112
114
|
|
113
115
|
Preview_Start = tk.Button(FrameThree, text="Start", fg="black", bg="#52514F", font=('Helvetica', 10))
|
114
116
|
|
115
117
|
|
116
118
|
|
117
|
-
|
119
|
+
#---- Button and Text | ボタンとテキスト-----
|
118
120
|
|
119
121
|
ButtonOne = tk.Button(win,text="Previwe", highlightbackground="#52514F", padx=20, pady=10)
|
120
122
|
|
@@ -126,13 +128,13 @@
|
|
126
128
|
|
127
129
|
|
128
130
|
|
129
|
-
|
131
|
+
#----Grid | 設計----
|
130
132
|
|
131
133
|
AppTitle.grid(column=2, row=0, columnspan=5, pady="10")
|
132
134
|
|
133
135
|
|
134
136
|
|
135
|
-
|
137
|
+
#Frames | 枠組
|
136
138
|
|
137
139
|
FrameOne.grid(column=2, row=1, padx='10', pady='10', sticky='nsew')
|
138
140
|
|
@@ -142,7 +144,7 @@
|
|
142
144
|
|
143
145
|
|
144
146
|
|
145
|
-
|
147
|
+
#Input | 入力
|
146
148
|
|
147
149
|
Text_Input_Path.grid(column=0, row=0, sticky='w')
|
148
150
|
|
@@ -152,7 +154,7 @@
|
|
152
154
|
|
153
155
|
|
154
156
|
|
155
|
-
|
157
|
+
#Output | 出力
|
156
158
|
|
157
159
|
Text_Output_Path.grid(column=0, row=0, sticky='w')
|
158
160
|
|
@@ -164,17 +166,17 @@
|
|
164
166
|
|
165
167
|
Field_Output_Name.grid(column=1, row=1, sticky='nsew')
|
166
168
|
|
167
|
-
|
169
|
+
#Extension_Option.grid(column=2, row=1, sticky='nsew')
|
168
|
-
|
169
|
-
|
170
|
-
|
170
|
+
|
171
|
+
|
172
|
+
|
171
|
-
|
173
|
+
#Preview | プレビュー
|
172
174
|
|
173
175
|
Preview_Start.grid(column=3, row=1, sticky='nsew')
|
174
176
|
|
175
177
|
|
176
178
|
|
177
|
-
|
179
|
+
#Buttons Grid | 設計のボタン
|
178
180
|
|
179
181
|
ButtonOne.grid(column=2, row=8, sticky='w', pady=1, padx=10)
|
180
182
|
|
@@ -188,12 +190,16 @@
|
|
188
190
|
|
189
191
|
|
190
192
|
|
191
|
-
|
193
|
+
#Start the GUI | GUI開始
|
192
194
|
|
193
195
|
win.mainloop()
|
194
196
|
|
195
197
|
|
196
198
|
|
199
|
+
```
|
200
|
+
|
201
|
+
|
202
|
+
|
197
203
|
### 試したこと
|
198
204
|
|
199
205
|
|
4
test
CHANGED
File without changes
|
test
CHANGED
@@ -126,7 +126,7 @@
|
|
126
126
|
|
127
127
|
|
128
128
|
|
129
|
-
"""
|
129
|
+
"""----Grid | 設計----"""
|
130
130
|
|
131
131
|
AppTitle.grid(column=2, row=0, columnspan=5, pady="10")
|
132
132
|
|
3
test
CHANGED
File without changes
|
test
CHANGED
@@ -100,7 +100,7 @@
|
|
100
100
|
|
101
101
|
Extension_Value = tk.StringVar()
|
102
102
|
|
103
|
-
Extension_Value.set(".MOV")
|
103
|
+
Extension_Value.set(".MOV") ""' default value as MOV | デフォルトMOV"""
|
104
104
|
|
105
105
|
"""Extension_Option = tk.OptionMenu(FrameTwo, Extension_Value)"""
|
106
106
|
|
@@ -164,7 +164,7 @@
|
|
164
164
|
|
165
165
|
Field_Output_Name.grid(column=1, row=1, sticky='nsew')
|
166
166
|
|
167
|
-
|
167
|
+
"""Extension_Option.grid(column=2, row=1, sticky='nsew')"""
|
168
168
|
|
169
169
|
|
170
170
|
|
2
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,9 +42,9 @@
|
|
42
42
|
|
43
43
|
|
44
44
|
|
45
|
-
|
45
|
+
""" =-=-=-GUI-=-=-="""
|
46
|
-
|
46
|
+
|
47
|
-
|
47
|
+
"""Create Instance"""
|
48
48
|
|
49
49
|
win = tk.Tk()
|
50
50
|
|
@@ -64,7 +64,7 @@
|
|
64
64
|
|
65
65
|
|
66
66
|
|
67
|
-
|
67
|
+
"""----Frames | 枠組----"""
|
68
68
|
|
69
69
|
FrameOne = tk.LabelFrame(win, text="Input Settings", fg="white", bg="#52514F", padx="20", pady="10")
|
70
70
|
|
@@ -74,9 +74,9 @@
|
|
74
74
|
|
75
75
|
|
76
76
|
|
77
|
-
|
77
|
+
"""--Widgets | 特徴----"""
|
78
|
-
|
78
|
+
|
79
|
-
|
79
|
+
"""Input Widgets | 入力"""
|
80
80
|
|
81
81
|
Text_Input_Path = tk.Label(FrameOne, text="Input Path", fg="white", bg="#52514F", font=('Helvetica', 10))
|
82
82
|
|
@@ -86,7 +86,7 @@
|
|
86
86
|
|
87
87
|
|
88
88
|
|
89
|
-
|
89
|
+
"""Output Widgets | 出力"""
|
90
90
|
|
91
91
|
Text_Output_Path = tk.Label(FrameTwo, text="Output Path", fg="white", bg="#52514F", font=('Helvetica', 10))
|
92
92
|
|
@@ -102,19 +102,19 @@
|
|
102
102
|
|
103
103
|
Extension_Value.set(".MOV") # default value as MOV | デフォルトMOV
|
104
104
|
|
105
|
-
|
105
|
+
"""Extension_Option = tk.OptionMenu(FrameTwo, Extension_Value)"""
|
106
|
-
|
106
|
+
|
107
|
-
|
107
|
+
"""Extension_Option.config(bg='#52514F', font=('Helvetica', 10), pady='2')"""
|
108
|
-
|
109
|
-
|
110
|
-
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
-
|
111
|
+
"""Preview Widgets | プレビュー"""
|
112
112
|
|
113
113
|
Preview_Start = tk.Button(FrameThree, text="Start", fg="black", bg="#52514F", font=('Helvetica', 10))
|
114
114
|
|
115
115
|
|
116
116
|
|
117
|
-
|
117
|
+
"""---- Button and Text | ボタンとテキスト-----"""
|
118
118
|
|
119
119
|
ButtonOne = tk.Button(win,text="Previwe", highlightbackground="#52514F", padx=20, pady=10)
|
120
120
|
|
@@ -126,13 +126,13 @@
|
|
126
126
|
|
127
127
|
|
128
128
|
|
129
|
-
|
129
|
+
""" ----Grid | 設計----"""
|
130
130
|
|
131
131
|
AppTitle.grid(column=2, row=0, columnspan=5, pady="10")
|
132
132
|
|
133
133
|
|
134
134
|
|
135
|
-
|
135
|
+
""" Frames | 枠組"""
|
136
136
|
|
137
137
|
FrameOne.grid(column=2, row=1, padx='10', pady='10', sticky='nsew')
|
138
138
|
|
@@ -142,7 +142,7 @@
|
|
142
142
|
|
143
143
|
|
144
144
|
|
145
|
-
|
145
|
+
"""Input | 入力"""
|
146
146
|
|
147
147
|
Text_Input_Path.grid(column=0, row=0, sticky='w')
|
148
148
|
|
@@ -152,7 +152,7 @@
|
|
152
152
|
|
153
153
|
|
154
154
|
|
155
|
-
|
155
|
+
"""Output | 出力"""
|
156
156
|
|
157
157
|
Text_Output_Path.grid(column=0, row=0, sticky='w')
|
158
158
|
|
@@ -168,13 +168,13 @@
|
|
168
168
|
|
169
169
|
|
170
170
|
|
171
|
-
|
171
|
+
"""Preview | プレビュー"""
|
172
172
|
|
173
173
|
Preview_Start.grid(column=3, row=1, sticky='nsew')
|
174
174
|
|
175
175
|
|
176
176
|
|
177
|
-
|
177
|
+
"""Buttons Grid | 設計のボタン"""
|
178
178
|
|
179
179
|
ButtonOne.grid(column=2, row=8, sticky='w', pady=1, padx=10)
|
180
180
|
|
@@ -188,7 +188,7 @@
|
|
188
188
|
|
189
189
|
|
190
190
|
|
191
|
-
|
191
|
+
"""Start the GUI | GUI開始"""
|
192
192
|
|
193
193
|
win.mainloop()
|
194
194
|
|