Bind Spacebar Key to Method in Tkinter

Dev Prakash Sharma
Updated on 04-May-2021 14:45:24

2K+ Views

Tkinter methods can be bound with the Keys or Mouse to perform certain operations or events in an application. Let us suppose for a particular application, we want to bind the Key such that it will perform a certain operation. We can bind any key to a particular operation or event by defining the bind(, callback) method.ExampleIn this example, we will create rectangles of random width and height by using random Module in Python. So, whenever we will press the Key, it will generate some random shapes on the screen.#Import the required Libraries from tkinter import * import random ... Read More

What are Repeaters in Computer Network

Ginni
Updated on 04-May-2021 14:37:19

11K+ Views

A repeater is a dynamic network device used to reproduce the signals when they transmit over a greater distance so that the signal’s strength remains equal. It can be used to create an Ethernet network. A repeater that occurs as the first layer of the OSI layer is the physical layer.Features of RepeatersThese repeaters are linked to each other at the physical layer.It sends the signals for the unsteady areas to enlarge the system signals.These receptors linked the various network signals to convert the data between the two devices.These repeaters can eliminate the distance between the two devices.The repeaters can ... Read More

Hub and Switch in Computer Network

Ginni
Updated on 04-May-2021 14:36:59

1K+ Views

HubsHub is a network connectivity device that enables relation nodes to interact with each other. It provides a frequent connection point for a tool in a network. So, Hub is a central concentrating point for a computer network. It supports a key data point for network cabling. Only coaxial cable Ethernet does not use hubs at all. Most of the local area networks use the hub to interconnect computers and other devices.A hub organizes the cables and broadcast signals to the different media segments as displayed in the figure −SwitchesA switch is a hardware tool that filters and promote folder ... Read More

What is the Hub?

Ginni
Updated on 04-May-2021 14:33:25

1K+ Views

A hub is a standard network point, also referred to as a network hub, to connect devices in a network. The hub has numerous ports. If a packet makes one port, it can be viewed by all the network segments because a packet is duplicated to another port. Hub is a unique device used to enhance a network by enabling increased workstations in the network.Types of HubsThere are three types of hubs which are as follows −Passive HubsPassive hubs do not include any computerized elements, and they do not procedure the data signal at all. The main goal of a ... Read More

Transmission Modes in Computer Networks: Simplex, Half-Duplex, and Full-Duplex

Ginni
Updated on 04-May-2021 14:30:52

5K+ Views

Transmission Mode represents the direction of the movement of data from one connection devices to other devices. It communicates the order of signal movement between the two devices.Following are the types of transmission modes in a computer network −Simplex Transmission ModeIn a computing network, when there is a single movement of data or one control movement of data from the sender to the receiver, it is called the Simplex mode of transmission.For example, A connection between a machine and a keyboard contains a simplex duplex transmission. A television advertisement is an example of simplex duplex transmission.A loudspeaker system is also a simplex transmission. A broadcaster communicates ... Read More

TCP/IP Reference Model

Ginni
Updated on 04-May-2021 14:28:44

6K+ Views

TCP/IP signifies transmission control protocol/Internet Protocol. It was created by Defence Advanced Research Projects Agency (ARPA, later DARPA) in the late 1970s. It is a collection of communication protocol. It involves collection and methods for managing with packet transport, media access, session interaction, data transfer, email and terminal emulation.The TCP/IP reference model has four layers, as display in the figure −Host to Network LayerThis is the lowest layer in the TCP/IP reference model. The layer functioning is usually different in various relations. The main function of this layer is to instruct the upper layer when the host is linked to ... Read More

Change Font Size in TTK Button

Dev Prakash Sharma
Updated on 04-May-2021 14:28:22

5K+ Views

Tkinter Ttk is a native library in Tkinter which is used to style the widgets in a Tkinter application. It provides a native GUI interface to all the widgets defined in the application.In order to style the widgets with ttk, we have to import it in the notebook using the command ‘from tkinter import ttk’.For a particular application, we can change the font properties such as background color, foreground color, font size, font-family, and font style by defining an instance of ttk style object. After initializing the ttk object, we can configure(options) each widget defined in an application.ExampleIn this example, ... Read More

Change Color of Tkinter Label Programmatically

Dev Prakash Sharma
Updated on 04-May-2021 14:27:43

17K+ Views

Tkinter Label widgets are used to add text or images to the application. We can even configure the basic properties of labels using the config(options) method. Generally, in order to configure the widgets property dynamically, we use callback functions where we modify the value of attributes.ExampleIn this example, we will modify the color Tkinter Labels by defining the callback function. The function can be activated by a button that forces the labels to change the color.#Import required libraries from tkinter import * from tkinter import ttk #Create an instance of tkinter frame win= Tk() #Define the geometry of ... Read More

Change Title Bar in Tkinter

Dev Prakash Sharma
Updated on 04-May-2021 14:27:13

22K+ Views

Tkinter initially sets a default title bar for every application. We can update or replace the Title Bar of the Tkinter application by configuring the title("Enter any Title") method. For a particular application, let us see how we can change the title of a Tkinter application that calculates the square of a number.Example#Import the required Libraries from tkinter import * from tkinter import ttk import math #Create an instance of Tkinter frame win = Tk() #Set the geometry of tkinter frame win.geometry("750x270") #Set the Title of Tkinter window win.title("Square Calculator") def find_square():    no= int(entry.get())   ... Read More

Connect a Progress Bar to a Function in Tkinter

Dev Prakash Sharma
Updated on 04-May-2021 14:26:46

3K+ Views

A Progress Bar helps to visualize the state of a running process. We have used and interacted with many progress bars such as getting the status of downloading a file from the internet, Loading a file on the local system, etc.Let us suppose that we want to create and connect a progress bar in our application. We will create a full-width progress bar by using ProgressBar(win, options) method. It can be configured through a button that enables and disables it.Example#Import the required Libraries from tkinter import * from tkinter import ttk import time #Create an instance of tkinter frame ... Read More

Advertisements