I'm working with my assignment, can someone help me?
How can I place other modules in my main page?
because this mainpage code now, it will pop up the 2 modules once i run the mainpage which is not good.
what i want is to insert this 2 modules in my mainpage so i can use these 2 module in my mainpage
below is my main page code
from tkinter import *
import Factor
import conversion
mainPage = Tk()
mainPage.mainloop()
"Factor.py"
import tkinter as tk
window = tk.Tk()
topFrame=tk.Frame(window)
midFrame=tk.Frame(window)
belowFrame=tk.Frame(window)
titlePage = tk.Label(window,text = 'Prime Factor')
titlePage.pack()
entNum = tk.Label(topFrame,text='Enter a number:')
entNum.pack(side='left')
entryInput = tk.Entry(topFrame)
entryInput.pack(side = 'left')
btn = tk.Button(midFrame,text = 'Check')
btn.pack()
tk.Label(midFrame,text = 'The prime Factors are :',font=("Times new roman",10)).pack()
topFrame.pack(side = 'top')
midFrame.pack(side = 'top')
belowFrame.pack(side = 'bottom')
window.mainloop()
"conversion.py"
from tkinter import *
root = Tk()
numOne=Label(root, text="Enter Value 1").grid(row=0, sticky=W)
numTwo=Label(root, text="Enter Value 2").grid(row=1, sticky=W)
addTotal=Label(root, text="The sum is :").grid(row=3, sticky=W)
enterEntry1 = Entry(root)
enterEntry2 = Entry(root)
enterEntry1.grid(row=0, column=1)
enterEntry2.grid(row=1, column=1)
Calcu = Button(root, text="Calculate").grid(row=7, column=1)
root.mainloop()
hope this will clear my query