#import everything from tkinter.
from tkinter import *
#download and install pillow:
from PIL import Image, ImageTk
# Define settings upon initialization. Here you can specify
def __init__(self, master=None):
# parameters that you want to send through the Frame class.
Frame.__init__(self, master)
#reference to the master widget, which is the tk window
self.master = master
self.init_window()
#Creation of init_window
def init_window(self):
# changing the title of our master widget
self.master.title("GUI")
# allowing the widget to take the full space of the root window
self.pack(fill=BOTH, expand=1)
# creating a menu instance
menu = Menu(self.master)
self.master.config(menu=menu)
# create the file object)
file = Menu(menu)
# adds a command to the menu option, calling it exit, and the
# command it runs on event is client_exit
file.add_command(label="Exit", command=self.client_exit)
#added "file" to our menu
menu.add_cascade(label="File", menu=file)
# create the file object)
edit = Menu(menu)
# adds a command to the menu option, calling it exit, and the
# command it runs on event is client_exit
edit.add_command(label="Show Img", command=self.showImg)
#added "file" to our menu
menu.add_cascade(label="Edit", menu=edit)
def showImg(self):
load = Image.open("your image.png")
render = ImageTk.PhotoImage(load)
# labels can be text or images
img = Label(self, image=render)
img.image = render
img.place(x=0, y=0)
def client_exit(self):
exit()
root = Tk()
root.geometry("400x300")
#creation of an instance
app = Window(root)
#mainloop
root.mainloop()
How to make a specific picture show up when a certain question is asked on tkinter?
You are asked to make up 50 gallons of 0.5% toxaphene solution. How many pounds of a 25% wettable powder would you add to 50 gallons of water?
Make a page with an animal joke.
Make the page show a pop up message when it loads.
Use html, java, css, bootstrap when needed.
Place code in the according to what file they belong too:
Exercise: Alert! Using our standard template, make a page with an animal joke. Set up the library directory, and anything else you need. Make the page show a popup message when it loads: "This page by YOUR NAME." Hint: try the JS alert() function....
1. Janine is asked to make up a solution of 10% MgS04. She has a bottle that is labeled MgS04 – 5H20. How many grams will she need to make up this solution? Describe the how she will make up this solution, including instrumentation, pipettes and glassware.
Nucleic acid polymers are made of ______ monomers. What components make up this monomer? Be specific. Protein polymers are made of _______ monomers. What components make up this monomer? Be specific.
How to use textbox, radio buttons, checkbox, and dropdown list to make up a quiz of 20 questions ... How to use textbox, radio buttons, checkbox, and dropdown list to make up a quiz of 20 questions ONLY using JavaScript. No Jquery. When the quiz starts, the questions don't appear all at once, it will display one question at a time with a next button, until the last question with Submit button. Finally, when the quiz is finished, display the...
Question 9. A, B, C, D, & E. Sorry how I took the picture other
questions show.
Mon 3:34 PM a s its (a) Calculate the required to warm the water to 100°C in 3.00 min. (The specific heat of water is 4186 J/kg "c.) (d) Derive a
java How do you take a method and using case switch make it so that when you enter 4 it brings up a certain method
the first picture is question A and B with the graph.
the second picture is question C related to the graph
PRICE STABILIZATION SCHEME: SHOW YOUR WORK! 30. Consider the market for tea in a certain country and graph it NEATLY on a separate sheet: (10 pts) Supply of Tea (thousands of tons) Demand for Tea (thousands of tons) 10 13 16 18 Price per Ton of Tea S20 S19 $18 S17 S16 SIS S14 $13 SI2 $11 S10 56...
Instructor Math 112 Section: Directions: Show all work, and answer each question that is asked. Explanations should be given in complete sentences. All graphs should be drawn accurately on this sheet, and be fully labeled 1. The stopping distance of a car, d, as a function of its speed, v, is given by the function d kv2 where k is a constant that is dependent on the specific car and conditions of the road. Suppose a certain car traveling 50...
?please show the steps and make the picture clear??
PROBLEMS 1. 1 herms output voltage of an AC source is 200 V and the operating frequency is 100 Hz. Write the equation giving the output voltage as a function of time. . 2. (a) What is the resistance of a lightbulb that uses an average power of 75.0 W when connected to a 60.0Hz power source having a maximum voltage of 170 V? (b) What If? What is the resistance...