- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Kiran Kumar Panigrahi has Published 426 Articles
Kiran Kumar Panigrahi
2K+ Views
We can update a Button widget in Tkinter in various ways, for example, we can change its size, change its background color, or remove its border, etc. In the following example, we will create three Button widgets and each of the buttons, upon clicking, will call a different function to ... Read More
Kiran Kumar Panigrahi
656 Views
We can use the and bindings to check if the CAPS Lock Key is ON or off. In the following example, we will create two user-defined functions "caps_lock_on()" and "caps_lock_off()" which will capture the event of Lock-KeyPress and Lock-KeyRelease and print the status on the screen.Example# Import required ... Read More
Kiran Kumar Panigrahi
4K+ Views
Let's take an example and see how to call a function using OptionMenu widget in Tkinter. In the example, we will use a StringVar object and call its get() method. A StringVar object in Tkinter can help manage the value of a widget.We will create an OptionMenu widget and fill ... Read More
Kiran Kumar Panigrahi
4K+ Views
A StringVar object in Tkinter can help manage the value of a widget such as an Entry widget or a Label widget. You can assign a StringVar object to the textvariable of a widget. For example, data = ['Car', 'Bus', 'Truck', 'Bike', 'Airplane'] var = StringVar(win) my_spinbox = ... Read More
Kiran Kumar Panigrahi
2K+ Views
To set a default string value on a Tkinter Spinbox, we will have to use the set method. Let us take an example and see how to create a spinbox with a set of string values and then set a default string.Steps −Import the tkinter library and create an instance ... Read More
Kiran Kumar Panigrahi
2K+ Views
To draw a line following mouse coordinates, we need to create a function to capture the coordinates of each mouse-click and then draw a line between two consecutive points. Let's take an example and see how it can be done.Steps −Import the tkinter library and create an instance of tkinter ... Read More
Kiran Kumar Panigrahi
8K+ Views
To put a border around a Frame in Tkinter, we have to use the highlightbackground and highlightthickeness parameters while creating the Frame. Let's take an example and see how to use these two parameters.Steps −Import the tkinter library and create an instance of tkinter frame.Set the size of the frame ... Read More
Kiran Kumar Panigrahi
5K+ Views
To copy from clipboard, we can use the clipboard_get() method of Tkinter. Let's take an example and see how to get the data from the clipboard and display it on a Tkinter window.Steps −Import the tkinter library and create an instance of tkinter frame.Set the size of the frame using ... Read More
Kiran Kumar Panigrahi
625 Views
To obtain a user's IP address, we can use Python's native networking interface, socket. First of all, we need to query the device's host name and then get its associated IP address.In this example, we will use the socket library to get the host name and IP address and print ... Read More
Kiran Kumar Panigrahi
3K+ Views
To draw a dashed line on a Tkinter canvas, we can use the dash parameter of create_line() method.Steps −Import the tkinter library and create an instance of tkinter frame.Set the size of the frame using geometry method.Create a Canvas widget and set its height and width.Next, use the create_line function ... Read More
To Continue Learning Please Login
Login with Google