質問するログイン新規登録

質問編集履歴

5

ソースを'''で囲みました。

2020/09/11 16:59

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -14,14 +14,14 @@
14
14
  ```
15
15
 
16
16
  ### 該当のソースコード
17
-
17
+ ```Python
18
18
  import os
19
19
  import sys
20
20
  import tkinter as tk
21
21
  from tkinter import filedialog
22
22
 
23
- """ =-=-=-GUI-=-=-="""
23
+ #=-=-=-GUI-=-=-=
24
- """Create Instance"""
24
+ #Create Instance
25
25
  win = tk.Tk()
26
26
  win.title("IVT Transcode app")
27
27
 
@@ -31,71 +31,74 @@
31
31
  win.iconphoto(False, icon_photo) # Sets the icon | アイコン
32
32
  AppTitle = tk.Label(win, text="TDBT GUI v0.1", fg="white", bg="#52514F", font=('Verdana', 20, 'bold'))
33
33
 
34
- """----Frames | 枠組----"""
34
+ #----Frames | 枠組----
35
35
  FrameOne = tk.LabelFrame(win, text="Input Settings", fg="white", bg="#52514F", padx="20", pady="10")
36
36
  FrameTwo = tk.LabelFrame(win, text="Output Settings", fg="white", bg="#52514F", padx="20", pady="10")
37
37
  FrameThree = tk.LabelFrame(win, text="Preview", fg="white", bg="#52514F", pady="30", padx="10")
38
38
 
39
- """--Widgets | 特徴----"""
39
+ #--Widgets | 特徴----
40
- """Input Widgets | 入力"""
40
+ #Input Widgets | 入力
41
41
  Text_Input_Path = tk.Label(FrameOne, text="Input Path", fg="white", bg="#52514F", font=('Helvetica', 10))
42
42
  Field_Input_Path = tk.Entry(FrameOne, fg="black", highlightbackground="#52514F")
43
43
  Button_Input_Path = tk.Button(FrameOne, text="Open File", highlightbackground="#52514F", font=('Helvetica', 10))
44
44
 
45
- """Output Widgets | 出力"""
45
+ #Output Widgets | 出力
46
46
  Text_Output_Path = tk.Label(FrameTwo, text="Output Path", fg="white", bg="#52514F", font=('Helvetica', 10))
47
47
  Text_Output_Name = tk.Label(FrameTwo, text="Output Filename", fg="white", bg="#52514F", font=('Helvetica', 10))
48
48
  Field_Output_Path = tk.Entry(FrameTwo, fg="black", highlightbackground="#52514F")
49
49
  Field_Output_Name = tk.Entry(FrameTwo, fg="black", highlightbackground="#52514F")
50
50
  Button_Output_Path = tk.Button(FrameTwo, text="Select Path", highlightbackground="#52514F", pady='2', font=('Helvetica', 10))
51
51
  Extension_Value = tk.StringVar()
52
- Extension_Value.set(".MOV") ""' default value as MOV | デフォルトMOV"""
52
+ Extension_Value.set(".MOV") #' default value as MOV | デフォルトMOV
53
+
53
- """Extension_Option = tk.OptionMenu(FrameTwo, Extension_Value)"""
54
+ 3Extension_Option = tk.OptionMenu(FrameTwo, Extension_Value)#
54
55
  """Extension_Option.config(bg='#52514F', font=('Helvetica', 10), pady='2')"""
55
56
 
56
- """Preview Widgets | プレビュー"""
57
+ #Preview Widgets | プレビュー
57
58
  Preview_Start = tk.Button(FrameThree, text="Start", fg="black", bg="#52514F", font=('Helvetica', 10))
58
59
 
59
- """---- Button and Text | ボタンとテキスト-----"""
60
+ #---- Button and Text | ボタンとテキスト-----
60
61
  ButtonOne = tk.Button(win,text="Previwe", highlightbackground="#52514F", padx=20, pady=10)
61
62
  ButtonTwo = tk.Button(win, text="Clear", highlightbackground="#52514F", padx=20, pady=10)
62
63
  Button_ffm_simple = tk.Button(win, text="Simple Transcode", highlightbackground="#52514F", padx=20, pady="10")
63
64
  TextOutputText = tk.Text(win, height=8, width=110, bg="grey", highlightbackground='grey')
64
65
 
65
- """----Grid | 設計----"""
66
+ #----Grid | 設計----
66
67
  AppTitle.grid(column=2, row=0, columnspan=5, pady="10")
67
68
 
68
- """ Frames | 枠組"""
69
+ #Frames | 枠組
69
70
  FrameOne.grid(column=2, row=1, padx='10', pady='10', sticky='nsew')
70
71
  FrameTwo.grid(column=2, row=2, padx='10', pady='10', sticky='nsew')
71
72
  FrameThree.grid(column=3, columnspan=5, row=1, rowspan=6, padx='10', pady='10', sticky='nsew')
72
73
 
73
- """Input | 入力"""
74
+ #Input | 入力
74
75
  Text_Input_Path.grid(column=0, row=0, sticky='w')
75
76
  Field_Input_Path.grid(column=1, row=0, sticky='nsew')
76
77
  Button_Input_Path.grid(column=2, row=0, sticky='nsew')
77
78
 
78
- """Output | 出力"""
79
+ #Output | 出力
79
80
  Text_Output_Path.grid(column=0, row=0, sticky='w')
80
81
  Field_Output_Path.grid(column=1, row=0, sticky='nsew')
81
82
  Button_Output_Path.grid(column=2, row=0, sticky='nsew')
82
83
  Text_Output_Name.grid(column=0, row=1, sticky='w')
83
84
  Field_Output_Name.grid(column=1, row=1, sticky='nsew')
84
- """Extension_Option.grid(column=2, row=1, sticky='nsew')"""
85
+ #Extension_Option.grid(column=2, row=1, sticky='nsew')
85
86
 
86
- """Preview | プレビュー"""
87
+ #Preview | プレビュー
87
88
  Preview_Start.grid(column=3, row=1, sticky='nsew')
88
89
 
89
- """Buttons Grid | 設計のボタン"""
90
+ #Buttons Grid | 設計のボタン
90
91
  ButtonOne.grid(column=2, row=8, sticky='w', pady=1, padx=10)
91
92
  ButtonTwo.grid(column=3, row=20, sticky='w', pady=1, padx=10)
92
93
  Button_ffm_simple.grid(column=2, row=10, sticky='w', pady=10, padx=10)
93
94
  TextOutputText.grid(column=2, columnspan=5, row=11, rowspan=5, sticky='nsew', pady=10, padx=10)
94
95
 
95
96
 
96
- """Start the GUI | GUI開始"""
97
+ #Start the GUI | GUI開始
97
98
  win.mainloop()
98
99
 
100
+ ```
101
+
99
102
  ### 試したこと
100
103
 
101
104
  ファイルのInput/Output, Button, PreviewなどをHTML,CSSを描くときのようにグループ化してわかりやすくしたいです。

4

2020/09/11 16:59

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -62,7 +62,7 @@
62
62
  Button_ffm_simple = tk.Button(win, text="Simple Transcode", highlightbackground="#52514F", padx=20, pady="10")
63
63
  TextOutputText = tk.Text(win, height=8, width=110, bg="grey", highlightbackground='grey')
64
64
 
65
- """ ----Grid | 設計----"""
65
+ """----Grid | 設計----"""
66
66
  AppTitle.grid(column=2, row=0, columnspan=5, pady="10")
67
67
 
68
68
  """ Frames | 枠組"""

3

2020/09/11 16:34

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -49,7 +49,7 @@
49
49
  Field_Output_Name = tk.Entry(FrameTwo, fg="black", highlightbackground="#52514F")
50
50
  Button_Output_Path = tk.Button(FrameTwo, text="Select Path", highlightbackground="#52514F", pady='2', font=('Helvetica', 10))
51
51
  Extension_Value = tk.StringVar()
52
- Extension_Value.set(".MOV") # default value as MOV | デフォルトMOV
52
+ Extension_Value.set(".MOV") ""' default value as MOV | デフォルトMOV"""
53
53
  """Extension_Option = tk.OptionMenu(FrameTwo, Extension_Value)"""
54
54
  """Extension_Option.config(bg='#52514F', font=('Helvetica', 10), pady='2')"""
55
55
 
@@ -81,7 +81,7 @@
81
81
  Button_Output_Path.grid(column=2, row=0, sticky='nsew')
82
82
  Text_Output_Name.grid(column=0, row=1, sticky='w')
83
83
  Field_Output_Name.grid(column=1, row=1, sticky='nsew')
84
- #Extension_Option.grid(column=2, row=1, sticky='nsew')
84
+ """Extension_Option.grid(column=2, row=1, sticky='nsew')"""
85
85
 
86
86
  """Preview | プレビュー"""
87
87
  Preview_Start.grid(column=3, row=1, sticky='nsew')

2

2020/09/11 16:33

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
File without changes

1

2020/09/11 16:32

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -20,8 +20,8 @@
20
20
  import tkinter as tk
21
21
  from tkinter import filedialog
22
22
 
23
- # =-=-=-GUI-=-=-=
23
+ """ =-=-=-GUI-=-=-="""
24
- # Create Instance
24
+ """Create Instance"""
25
25
  win = tk.Tk()
26
26
  win.title("IVT Transcode app")
27
27
 
@@ -31,18 +31,18 @@
31
31
  win.iconphoto(False, icon_photo) # Sets the icon | アイコン
32
32
  AppTitle = tk.Label(win, text="TDBT GUI v0.1", fg="white", bg="#52514F", font=('Verdana', 20, 'bold'))
33
33
 
34
- # ----Frames | 枠組----
34
+ """----Frames | 枠組----"""
35
35
  FrameOne = tk.LabelFrame(win, text="Input Settings", fg="white", bg="#52514F", padx="20", pady="10")
36
36
  FrameTwo = tk.LabelFrame(win, text="Output Settings", fg="white", bg="#52514F", padx="20", pady="10")
37
37
  FrameThree = tk.LabelFrame(win, text="Preview", fg="white", bg="#52514F", pady="30", padx="10")
38
38
 
39
- # ----Widgets | 特徴----
39
+ """--Widgets | 特徴----"""
40
- # Input Widgets | 入力
40
+ """Input Widgets | 入力"""
41
41
  Text_Input_Path = tk.Label(FrameOne, text="Input Path", fg="white", bg="#52514F", font=('Helvetica', 10))
42
42
  Field_Input_Path = tk.Entry(FrameOne, fg="black", highlightbackground="#52514F")
43
43
  Button_Input_Path = tk.Button(FrameOne, text="Open File", highlightbackground="#52514F", font=('Helvetica', 10))
44
44
 
45
- # Output Widgets | 出力
45
+ """Output Widgets | 出力"""
46
46
  Text_Output_Path = tk.Label(FrameTwo, text="Output Path", fg="white", bg="#52514F", font=('Helvetica', 10))
47
47
  Text_Output_Name = tk.Label(FrameTwo, text="Output Filename", fg="white", bg="#52514F", font=('Helvetica', 10))
48
48
  Field_Output_Path = tk.Entry(FrameTwo, fg="black", highlightbackground="#52514F")
@@ -50,32 +50,32 @@
50
50
  Button_Output_Path = tk.Button(FrameTwo, text="Select Path", highlightbackground="#52514F", pady='2', font=('Helvetica', 10))
51
51
  Extension_Value = tk.StringVar()
52
52
  Extension_Value.set(".MOV") # default value as MOV | デフォルトMOV
53
- #Extension_Option = tk.OptionMenu(FrameTwo, Extension_Value)
53
+ """Extension_Option = tk.OptionMenu(FrameTwo, Extension_Value)"""
54
- #Extension_Option.config(bg='#52514F', font=('Helvetica', 10), pady='2')
54
+ """Extension_Option.config(bg='#52514F', font=('Helvetica', 10), pady='2')"""
55
55
 
56
- # Preview Widgets | プレビュー
56
+ """Preview Widgets | プレビュー"""
57
57
  Preview_Start = tk.Button(FrameThree, text="Start", fg="black", bg="#52514F", font=('Helvetica', 10))
58
58
 
59
- # ---- Button and Text | ボタンとテキスト-----
59
+ """---- Button and Text | ボタンとテキスト-----"""
60
60
  ButtonOne = tk.Button(win,text="Previwe", highlightbackground="#52514F", padx=20, pady=10)
61
61
  ButtonTwo = tk.Button(win, text="Clear", highlightbackground="#52514F", padx=20, pady=10)
62
62
  Button_ffm_simple = tk.Button(win, text="Simple Transcode", highlightbackground="#52514F", padx=20, pady="10")
63
63
  TextOutputText = tk.Text(win, height=8, width=110, bg="grey", highlightbackground='grey')
64
64
 
65
- # ----Grid | 設計----
65
+ """ ----Grid | 設計----"""
66
66
  AppTitle.grid(column=2, row=0, columnspan=5, pady="10")
67
67
 
68
- # Frames | 枠組
68
+ """ Frames | 枠組"""
69
69
  FrameOne.grid(column=2, row=1, padx='10', pady='10', sticky='nsew')
70
70
  FrameTwo.grid(column=2, row=2, padx='10', pady='10', sticky='nsew')
71
71
  FrameThree.grid(column=3, columnspan=5, row=1, rowspan=6, padx='10', pady='10', sticky='nsew')
72
72
 
73
- # Input | 入力
73
+ """Input | 入力"""
74
74
  Text_Input_Path.grid(column=0, row=0, sticky='w')
75
75
  Field_Input_Path.grid(column=1, row=0, sticky='nsew')
76
76
  Button_Input_Path.grid(column=2, row=0, sticky='nsew')
77
77
 
78
- # Output | 出力
78
+ """Output | 出力"""
79
79
  Text_Output_Path.grid(column=0, row=0, sticky='w')
80
80
  Field_Output_Path.grid(column=1, row=0, sticky='nsew')
81
81
  Button_Output_Path.grid(column=2, row=0, sticky='nsew')
@@ -83,17 +83,17 @@
83
83
  Field_Output_Name.grid(column=1, row=1, sticky='nsew')
84
84
  #Extension_Option.grid(column=2, row=1, sticky='nsew')
85
85
 
86
- #Preview | プレビュー
86
+ """Preview | プレビュー"""
87
87
  Preview_Start.grid(column=3, row=1, sticky='nsew')
88
88
 
89
- # Buttons Grid | 設計のボタン
89
+ """Buttons Grid | 設計のボタン"""
90
90
  ButtonOne.grid(column=2, row=8, sticky='w', pady=1, padx=10)
91
91
  ButtonTwo.grid(column=3, row=20, sticky='w', pady=1, padx=10)
92
92
  Button_ffm_simple.grid(column=2, row=10, sticky='w', pady=10, padx=10)
93
93
  TextOutputText.grid(column=2, columnspan=5, row=11, rowspan=5, sticky='nsew', pady=10, padx=10)
94
94
 
95
95
 
96
- # Start the GUI | GUI開始
96
+ """Start the GUI | GUI開始"""
97
97
  win.mainloop()
98
98
 
99
99
  ### 試したこと