Develop User Interface as mentioned below as per the requirements:
Button One: Activate Button Two: Deactivate
Button One is pressed two fields and a button appear
Field 1: From Number Field 2: To Number
Button: Activate
Field 1 should auto-populate with the number queried from DB. And should not be changeable. The reason to still have a field is just to make it explicit what is happening.
When the Activate Button is pressed execute some action with parameter as below.
CALLACTION = "Call Forwarding On"
PHONENUMBER = From Number (From Field 1)
TOLLNUMBER = To Number (From Field 2)
Button Two is pressed a prompt and two buttons appear.
Prompt: "Are you sure you would like to deactivate the <Telephone Number>?" Where <Telephone Number> is the number initially queried.
Button 1: Yes Button 2: No
from tkinter import *
root = Tk()
root.geometry('300x300')
btn1 = Button(root, text = 'Button1', bd = '5',
command = root.destroy)
btn1.pack(side = 'top')
btn2 = Button(root, text = 'Button2', bd = '5',
command = root.destroy)
btn2.pack(side = 'top')
root.mainloop()
Comments
Leave a comment