
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
Tkinter bell() method
Tkinter bell() method produces the default event or dialogue sound of the system. This method can be invoked in the default window or frame. We can change the sound of the window by going to the system configuration.
In this example, we will create a button that will make the default sound.
Example
#Import the library from tkinter import * #Create an instance of tkinter frame win= Tk() #Define the size of the window win.geometry("700x150") win.resizable(0,0) #Define the Bell function def click(): win.bell() Button(win,text= "Click Me", command= click).pack(pady=20) win.mainloop()
Output
Running the above code will create a button and clicking over that will produce the sound of the system.
- Related Articles
- after method in Python Tkinter
- destroy() method in Tkinter - Python
- Python - geometry method in Tkinter
- Bell's Palsy
- How the electric bell work?
- Difference between Chipotle and Taco Bell
- What does the "wait_window" method do in Tkinter?
- Change command Method for Tkinter Button in Python
- What is the principle of electric bell ?
- The Psychosocial Impact of Bell's Palsy
- What are the arguments to Tkinter variable trace method callbacks?
- Difference between "fill" and "expand" options for tkinter pack method
- Explain the working of an electric bell in brief.
- Difference Between Bell's Palsy and Cerebral Palsy
- How we can we make a diagram of electric bell ?

Advertisements