Skip to content

Commit 7935a80

Browse files
committed
Where magic happens
1 parent e7421db commit 7935a80

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

main.py

+10-21
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
FigureCanvasTkAgg, NavigationToolbar2Tk)
1010
from matplotlib.figure import Figure
1111

12-
13-
# =====================================================#
14-
# ======= Initial Parameters =======#
15-
# =====================================================#
12+
# Initialization
1613

1714
mpl.use("TkAgg")
1815
mpl.style.use('seaborn-bright')
@@ -21,9 +18,7 @@
2118
app.resizable(True, False)
2219
app.title('GraphMaker')
2320

24-
# =====================================================#
25-
# ========= Functions Area =========#
26-
# =====================================================#
21+
# Global Variables
2722
h_ = 1
2823
w_ = 14
2924
b_ = 1
@@ -37,6 +32,11 @@
3732
file_s = []
3833

3934

35+
# Custom class for functions
36+
class GraphyFunc:
37+
pass
38+
39+
4040
# ================| Open menu callback |================#
4141
def openFile():
4242
for widget in infobox.winfo_children():
@@ -138,9 +138,7 @@ def _quit():
138138
exit()
139139

140140

141-
# =====================================================#
142-
# ========= Tkinter Functions Area =========#
143-
# =====================================================#
141+
# Tkinter widget maker
144142
def widget_func(widget, tabName, text_, textv_, he_, wi_, command_, c_, r_, py_, px_, cs_, rs_, stik_, **kwargs):
145143
if widget == 'btn':
146144
ttk.Button(tabName, text=text_, command=command_).grid(column=c_, row=r_, pady=py_, padx=px_, columnspan=cs_,
@@ -150,9 +148,7 @@ def widget_func(widget, tabName, text_, textv_, he_, wi_, command_, c_, r_, py_,
150148
sticky=stik_)
151149

152150

153-
# ======================================================================================#
154-
# ======================= Menu Area =======================#
155-
# ======================================================================================#
151+
# Menu Area
156152

157153
# -------------------| Menu Bar |-------------------#
158154
menu_bar = Menu(app)
@@ -170,19 +166,12 @@ def widget_func(widget, tabName, text_, textv_, he_, wi_, command_, c_, r_, py_,
170166
help_menu.add_command(label="About", command=_msgBox)
171167
menu_bar.add_cascade(label="Help", menu=help_menu)
172168

173-
# ======================================================================================#
174-
# ======================= Multi-Tab ======================#
175-
# ======================================================================================#
176-
169+
# ===================| Tab-control |===================#
177170
tabControl = ttk.Notebook(app)
178171
tab_1 = ttk.Frame(tabControl)
179172
tabControl.add(tab_1, text=' Graph ')
180173
tabControl.pack(expand=1, fill="both")
181174

182-
# #######################################################################################
183-
# #################### Tab-1 Area ##########################
184-
# #######################################################################################
185-
186175
# =================| Graph-Canvas Frame |=================#
187176
graph_frame = ttk.LabelFrame(tab_1, text=' Graph Canvas ')
188177
graph_frame.grid(column=0, row=0, columnspan=3, padx=8, pady=4)

0 commit comments

Comments
 (0)