Hi , would you be able to explain the purpose of the statments below: note: It is on python from tkinter import * class
Posted: Thu May 26, 2022 9:19 am
Hi , would you be able to explain the purpose of the statments
below:
note: It is on python
from tkinter import *
class ProcessButtonEvent:
def __init__(self):
window = Tk()
btOk= Button(window, text = "Ok", fg = "red", command
= self.processOK)
btCancel = Button(window, text = "Cancel", bg =
"yellow", command = self.processCancel)
btOK.pack()
btCancel.pack()
window.mainloop()
def processOK(self):
print("OK button is clicked")
def processCancel(self):
print("Cancel button is clicked")
myGUI = ProcessButtonEvent()
below:
note: It is on python
from tkinter import *
class ProcessButtonEvent:
def __init__(self):
window = Tk()
btOk= Button(window, text = "Ok", fg = "red", command
= self.processOK)
btCancel = Button(window, text = "Cancel", bg =
"yellow", command = self.processCancel)
btOK.pack()
btCancel.pack()
window.mainloop()
def processOK(self):
print("OK button is clicked")
def processCancel(self):
print("Cancel button is clicked")
myGUI = ProcessButtonEvent()