Answer to Question #212378 in Python for bharath

Question #212378

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


1
Expert's answer
2021-07-01T01:12:03-0400


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()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS