This presentation educates you about Python - GUI Programming(Tkinter), Tkinter Programming with syntaxe example, Tkinter Widgets with Operator & Description, Standard attributes.
For more topics stay tuned with learnbay.
Python provides several options for developing graphical user interfaces (GUIs), with Tkinter being the most commonly used. Tkinter is a standard Python interface that allows creating GUI applications in Python easily. To create a Tkinter app, one imports Tkinter, creates the main window, adds widgets to it, and applies event triggers to the widgets. Common widgets in Tkinter include buttons, canvases, checkbuttons, entries, frames, labels, listboxes, menus, messages, and radiobuttons.
The document discusses the tkinter module in Python, which provides tools for building graphical user interfaces (GUIs). Tkinter comes pre-installed with Python and allows creating GUI elements like labels, buttons, menus, and more. The document covers how to import tkinter, create windows, add widgets, and arrange widgets using different geometry managers. It also provides examples of creating common widgets like labels, buttons, checkboxes, and menus. Finally, it briefly introduces the turtle module for drawing shapes and graphics.
Best Python GUI Frameworks which supports multiple platforms (Windows,
Linux and Mac). These all GUI frameworks are easy to use and popular,
some of them are open-source.
Tkinter is the standard Python graphical user interface (GUI) package. It provides widgets like buttons, labels, text boxes, etc. to build desktop applications. Tkinter applications can be created by importing Tkinter, creating a main window, adding widgets to it, and starting the main event loop. Common widgets include buttons, checkboxes, labels, text boxes, menus and more. Tkinter provides pack, grid, and place methods to organize widgets on the window.
This document provides an overview of GUI programming basics using the AWT API in Java. It discusses the key component, container and layout manager classes used to create graphical user interfaces in Java. Component classes like Button, Label and TextField are used to add interactive elements, while container classes like Frame and Panel hold other components. Layout managers help position and organize components visually. The document also provides examples of creating simple frames and applications using these AWT classes.
Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk GUI toolkit,[1] and is Python's de facto standard GUI.[2] Tkinter is included with standard Linux, Microsoft Windows and macOS installs of Python.
The name Tkinter comes from Tk interface. Tkinter was written by Steen Lumholt and Guido van Rossum,[3] then later revised by Fredrik Lundh.[4]
Tkinter is free software released under a Python license.[5]
Description
As with most other modern Tk bindings, Tkinter is implemented as a Python wrapper around a complete Tcl interpreter embedded in the Python interpreter. Tkinter calls are translated into Tcl commands, which are fed to this embedded interpreter, thus making it possible to mix Python and Tcl in a single application.
There are several popular GUI library alternatives available, such as Kivy, Pygame, Pyglet, PyGObject, PyQt, PySide, and wxPython.
Some definitions
Window
This term has different meanings in different contexts, but in general it refers to a rectangular area somewhere on the user's display screen.
Top-level window
A window which acts as a child of the primary window. It will be decorated with the standard frame and controls for the desktop manager. It can be moved around the desktop and can usually be resized.
Widget
The generic term for any of the building blocks that make up an application in a graphical user interface.
Core widgets: The containers: frame, labelframe, toplevel, paned window. The buttons: button, radiobutton, checkbutton (checkbox), and menubutton. The text widgets: label, message, text. The entry widgets: scale, scrollbar, listbox, slider, spinbox, entry (singleline), optionmenu, text (multiline), and canvas (vector and pixel graphics).
Tkinter provides three modules that allow pop-up dialogs to be displayed: tk.messagebox (confirmation, information, warning and error dialogs), tk.filedialog (single file, multiple file and directory selection dialogs) and tk.colorchooser (colour picker).
Python 2.7 and Python 3.1 incorporate the "themed Tk" ("ttk") functionality of Tk 8.5.[6][7] This allows Tk widgets to be easily themed to look like the native desktop environment in which the application is running, thereby addressing a long-standing criticism of Tk (and hence of Tkinter). Some widgets are exclusive to ttk, such as the combobox, progressbar, treeview, notebook, separator and sizegrip.[8]
Frame
In Tkinter, the Frame widget is the basic unit of organization for complex layouts. A frame is a rectangular area that can contain other widgets.
Child and parent
When any widget is created, a parent–child relationship is created. For example, if you place a text label inside a frame, the frame is the parent of the label.
A minimal application
Here is a minimal Python 3 Tkinter application with one widget:[9]
#!/usr/bin/env python3
from tkinter import *
root = Tk() # Create the root (base) window
w = Label(root, text="Hello, world!") creating label by tkintr
GUI Programming using Tkinter-converted.pptxdvarshitha04
The document provides an introduction to GUI programming using Tkinter. It discusses:
- Tkinter is Python's default GUI library, which is based on the Tk toolkit. Tkinter allows building GUI applications that run on most platforms.
- The key steps to build a GUI app with Tkinter are: import Tkinter, create a top-level window, build GUI components within the window, connect components to code, and enter the main event loop.
- Tkinter provides widgets like buttons, labels, entries etc. that can be organized on the top-level window using geometry managers like grid, pack or place. Events and callbacks allow widgets to trigger application functions.
Swing is a Java GUI widget toolkit that improves upon the older AWT toolkit. It includes common GUI components like JFrame, JPanel, and JLabel. JFrame represents a window, JPanel is used to group and layout components, and JLabel displays text. These components have constructors and methods to create, configure, add, and listen to GUI elements. Layout managers automatically position components and should be used for most applications.
Flutter architecture consists of widgets, gestures, state management, and layers. The key components are:
- Widgets are the primary UI elements and make up the application structure. MaterialApp and Scaffold widgets provide common UI components.
- Gestures allow interaction through taps, swipes, etc. and are handled by GestureDetector.
- State management tracks data that can change using StatefulWidget and State classes.
- The framework layer provides rendering, widgets and animation services to build Flutter apps.
The document provides an overview of Tkinter, the standard GUI library for Python. It discusses various Tkinter widgets like Button, Canvas, Checkbutton, Entry, Frame, Label, Listbox, Menubutton, Message, and Radiobutton. Code examples are given to demonstrate how to create and use each widget. Tkinter allows creating graphical user interfaces in Python easily by providing an object-oriented interface to the Tk GUI toolkit.
This document provides an overview of GUI and Tkinter in Python. It discusses:
- Tkinter is the most commonly used method for developing GUI applications in Python as it is bundled with Python and offers a simple interface.
- The main components of a Tkinter application include importing Tkinter, creating a main window container, adding widgets to the window, and applying events to widgets.
- Common widgets like Button, Canvas, Checkbutton, Entry, Label, Menu, Radiobutton, Scale, Text, Spinbox are explained along with examples of how to create and use them.
- Geometry managers like pack, grid, place are discussed which control widget layout within their parent window.
- The mainloop method is used
This document discusses the evolution of graphical user interface (GUI) capabilities in the Java programming language. It describes the Abstract Window Toolkit (AWT) introduced in JDK 1.0, which provided basic cross-platform GUI functionality but had limitations. JDK 1.1 improved on AWT with an event delegation model. JDK 1.2 introduced Swing, a richer GUI library that better integrated with native operating system look and feels. Swing components are lightweight compared to heavyweight AWT components. The document also covers GUI component classes, layout managers, menus, labels and event handling in Java GUI programming.
Python is a high-level, general-purpose programming language. Its design phil...bhargavi804095
Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.[31]
Python is dynamically typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming. It is often described as a "batteries included" language due to its comprehensive standard library.[
This chapter introduces the Abstract Window Toolkit (AWT) in Java. It discusses creating windows and frames using AWT classes. It covers working with graphics, colors, fonts, and layout managers. It also discusses using AWT controls like buttons, checkboxes, lists, menus and dialog boxes. The chapter describes handling events by extending AWT components and exploring controls, menus and layout managers in more detail.
The document provides an overview of Tkinter, the standard GUI library for Python. It discusses various Tkinter widgets like Button, Canvas, Checkbutton, Entry, Frame, Label, Listbox, Menubutton, Message, Radiobutton, Scale, Scrollbar, Text, Toplevel, Spinbox, PanedWindow and provides code examples for creating and using each widget. It explains the purpose of each widget and the basic syntax for creating it in Python with Tkinter.
This document discusses creating graphical user interfaces (GUIs) in Python using the Tkinter library. It covers Tkinter widgets like labels, buttons, entries, comboboxes, checkbuttons, radiobuttons, and text widgets. It also discusses geometry management with pack, grid, and place methods and organizing layouts with frames. Examples include creating a simple calculator app GUI with Tkinter.
Swing and Graphical User Interface in Javababak danyal
The document provides information about the Swing graphical user interface library in Java. It describes that Swing is the official GUI toolkit for Java, released as part of Java Foundation Classes. It discusses the key components, layout managers like BorderLayout and GridLayout, and event handling in Swing using interfaces, anonymous inner classes, and adapter classes.
Tkinter is a standard GUI library for Python that provides a powerful object-oriented interface to the Tk GUI toolkit. It allows for the creation of GUI applications through widgets like buttons, labels, text boxes, and more. Tkinter applications start with importing the library and creating a main window with Tk(), then entering the main event loop with mainloop() to wait for and process events. Widgets can be organized and placed within the main window using geometry managers like pack(), grid(), and place(). Events can also be handled through binding Python functions to different widget events.
The document discusses Java AWT (Abstract Window Toolkit). It describes that AWT is an API that allows developing GUI applications in Java. It provides classes like TextField, Label, TextArea etc. for building GUI components. The document then explains key AWT concepts like containers, windows, panels, events, event handling model, working with colors and fonts.
This document provides an overview of GUI programming basics using the AWT API in Java. It discusses the key component, container and layout manager classes used to create graphical user interfaces in Java. Component classes like Button, Label and TextField are used to add interactive elements, while container classes like Frame and Panel hold other components. Layout managers help position and organize components visually. The document also provides examples of creating simple frames and applications using these AWT classes.
Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk GUI toolkit,[1] and is Python's de facto standard GUI.[2] Tkinter is included with standard Linux, Microsoft Windows and macOS installs of Python.
The name Tkinter comes from Tk interface. Tkinter was written by Steen Lumholt and Guido van Rossum,[3] then later revised by Fredrik Lundh.[4]
Tkinter is free software released under a Python license.[5]
Description
As with most other modern Tk bindings, Tkinter is implemented as a Python wrapper around a complete Tcl interpreter embedded in the Python interpreter. Tkinter calls are translated into Tcl commands, which are fed to this embedded interpreter, thus making it possible to mix Python and Tcl in a single application.
There are several popular GUI library alternatives available, such as Kivy, Pygame, Pyglet, PyGObject, PyQt, PySide, and wxPython.
Some definitions
Window
This term has different meanings in different contexts, but in general it refers to a rectangular area somewhere on the user's display screen.
Top-level window
A window which acts as a child of the primary window. It will be decorated with the standard frame and controls for the desktop manager. It can be moved around the desktop and can usually be resized.
Widget
The generic term for any of the building blocks that make up an application in a graphical user interface.
Core widgets: The containers: frame, labelframe, toplevel, paned window. The buttons: button, radiobutton, checkbutton (checkbox), and menubutton. The text widgets: label, message, text. The entry widgets: scale, scrollbar, listbox, slider, spinbox, entry (singleline), optionmenu, text (multiline), and canvas (vector and pixel graphics).
Tkinter provides three modules that allow pop-up dialogs to be displayed: tk.messagebox (confirmation, information, warning and error dialogs), tk.filedialog (single file, multiple file and directory selection dialogs) and tk.colorchooser (colour picker).
Python 2.7 and Python 3.1 incorporate the "themed Tk" ("ttk") functionality of Tk 8.5.[6][7] This allows Tk widgets to be easily themed to look like the native desktop environment in which the application is running, thereby addressing a long-standing criticism of Tk (and hence of Tkinter). Some widgets are exclusive to ttk, such as the combobox, progressbar, treeview, notebook, separator and sizegrip.[8]
Frame
In Tkinter, the Frame widget is the basic unit of organization for complex layouts. A frame is a rectangular area that can contain other widgets.
Child and parent
When any widget is created, a parent–child relationship is created. For example, if you place a text label inside a frame, the frame is the parent of the label.
A minimal application
Here is a minimal Python 3 Tkinter application with one widget:[9]
#!/usr/bin/env python3
from tkinter import *
root = Tk() # Create the root (base) window
w = Label(root, text="Hello, world!") creating label by tkintr
GUI Programming using Tkinter-converted.pptxdvarshitha04
The document provides an introduction to GUI programming using Tkinter. It discusses:
- Tkinter is Python's default GUI library, which is based on the Tk toolkit. Tkinter allows building GUI applications that run on most platforms.
- The key steps to build a GUI app with Tkinter are: import Tkinter, create a top-level window, build GUI components within the window, connect components to code, and enter the main event loop.
- Tkinter provides widgets like buttons, labels, entries etc. that can be organized on the top-level window using geometry managers like grid, pack or place. Events and callbacks allow widgets to trigger application functions.
Swing is a Java GUI widget toolkit that improves upon the older AWT toolkit. It includes common GUI components like JFrame, JPanel, and JLabel. JFrame represents a window, JPanel is used to group and layout components, and JLabel displays text. These components have constructors and methods to create, configure, add, and listen to GUI elements. Layout managers automatically position components and should be used for most applications.
Flutter architecture consists of widgets, gestures, state management, and layers. The key components are:
- Widgets are the primary UI elements and make up the application structure. MaterialApp and Scaffold widgets provide common UI components.
- Gestures allow interaction through taps, swipes, etc. and are handled by GestureDetector.
- State management tracks data that can change using StatefulWidget and State classes.
- The framework layer provides rendering, widgets and animation services to build Flutter apps.
The document provides an overview of Tkinter, the standard GUI library for Python. It discusses various Tkinter widgets like Button, Canvas, Checkbutton, Entry, Frame, Label, Listbox, Menubutton, Message, and Radiobutton. Code examples are given to demonstrate how to create and use each widget. Tkinter allows creating graphical user interfaces in Python easily by providing an object-oriented interface to the Tk GUI toolkit.
This document provides an overview of GUI and Tkinter in Python. It discusses:
- Tkinter is the most commonly used method for developing GUI applications in Python as it is bundled with Python and offers a simple interface.
- The main components of a Tkinter application include importing Tkinter, creating a main window container, adding widgets to the window, and applying events to widgets.
- Common widgets like Button, Canvas, Checkbutton, Entry, Label, Menu, Radiobutton, Scale, Text, Spinbox are explained along with examples of how to create and use them.
- Geometry managers like pack, grid, place are discussed which control widget layout within their parent window.
- The mainloop method is used
This document discusses the evolution of graphical user interface (GUI) capabilities in the Java programming language. It describes the Abstract Window Toolkit (AWT) introduced in JDK 1.0, which provided basic cross-platform GUI functionality but had limitations. JDK 1.1 improved on AWT with an event delegation model. JDK 1.2 introduced Swing, a richer GUI library that better integrated with native operating system look and feels. Swing components are lightweight compared to heavyweight AWT components. The document also covers GUI component classes, layout managers, menus, labels and event handling in Java GUI programming.
Python is a high-level, general-purpose programming language. Its design phil...bhargavi804095
Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.[31]
Python is dynamically typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming. It is often described as a "batteries included" language due to its comprehensive standard library.[
This chapter introduces the Abstract Window Toolkit (AWT) in Java. It discusses creating windows and frames using AWT classes. It covers working with graphics, colors, fonts, and layout managers. It also discusses using AWT controls like buttons, checkboxes, lists, menus and dialog boxes. The chapter describes handling events by extending AWT components and exploring controls, menus and layout managers in more detail.
The document provides an overview of Tkinter, the standard GUI library for Python. It discusses various Tkinter widgets like Button, Canvas, Checkbutton, Entry, Frame, Label, Listbox, Menubutton, Message, Radiobutton, Scale, Scrollbar, Text, Toplevel, Spinbox, PanedWindow and provides code examples for creating and using each widget. It explains the purpose of each widget and the basic syntax for creating it in Python with Tkinter.
This document discusses creating graphical user interfaces (GUIs) in Python using the Tkinter library. It covers Tkinter widgets like labels, buttons, entries, comboboxes, checkbuttons, radiobuttons, and text widgets. It also discusses geometry management with pack, grid, and place methods and organizing layouts with frames. Examples include creating a simple calculator app GUI with Tkinter.
Swing and Graphical User Interface in Javababak danyal
The document provides information about the Swing graphical user interface library in Java. It describes that Swing is the official GUI toolkit for Java, released as part of Java Foundation Classes. It discusses the key components, layout managers like BorderLayout and GridLayout, and event handling in Swing using interfaces, anonymous inner classes, and adapter classes.
Tkinter is a standard GUI library for Python that provides a powerful object-oriented interface to the Tk GUI toolkit. It allows for the creation of GUI applications through widgets like buttons, labels, text boxes, and more. Tkinter applications start with importing the library and creating a main window with Tk(), then entering the main event loop with mainloop() to wait for and process events. Widgets can be organized and placed within the main window using geometry managers like pack(), grid(), and place(). Events can also be handled through binding Python functions to different widget events.
The document discusses Java AWT (Abstract Window Toolkit). It describes that AWT is an API that allows developing GUI applications in Java. It provides classes like TextField, Label, TextArea etc. for building GUI components. The document then explains key AWT concepts like containers, windows, panels, events, event handling model, working with colors and fonts.
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...AI Publications
The escalating energy crisis, heightened environmental awareness and the impacts of climate change have driven global efforts to reduce carbon emissions. A key strategy in this transition is the adoption of green energy technologies particularly for charging electric vehicles (EVs). According to the U.S. Department of Energy, EVs utilize approximately 60% of their input energy during operation, twice the efficiency of conventional fossil fuel vehicles. However, the environmental benefits of EVs are heavily dependent on the source of electricity used for charging. This study examines the potential of renewable energy (RE) as a sustainable alternative for electric vehicle (EV) charging by analyzing several critical dimensions. It explores the current RE sources used in EV infrastructure, highlighting global adoption trends, their advantages, limitations, and the leading nations in this transition. It also evaluates supporting technologies such as energy storage systems, charging technologies, power electronics, and smart grid integration that facilitate RE adoption. The study reviews RE-enabled smart charging strategies implemented across the industry to meet growing global EV energy demands. Finally, it discusses key challenges and prospects associated with grid integration, infrastructure upgrades, standardization, maintenance, cybersecurity, and the optimization of energy resources. This review aims to serve as a foundational reference for stakeholders and researchers seeking to advance the sustainable development of RE based EV charging systems.
Design of Variable Depth Single-Span Post.pdfKamel Farid
Hunched Single Span Bridge: -
(HSSBs) have maximum depth at ends and minimum depth at midspan.
Used for long-span river crossings or highway overpasses when:
Aesthetically pleasing shape is required or
Vertical clearance needs to be maximized
Newly poured concrete opposing hot and windy conditions is considerably susceptible to plastic shrinkage cracking. Crack-free concrete structures are essential in ensuring high level of durability and functionality as cracks allow harmful instances or water to penetrate in the concrete resulting in structural damages, e.g. reinforcement corrosion or pressure application on the crack sides due to water freezing effect. Among other factors influencing plastic shrinkage, an important one is the concrete surface humidity evaporation rate. The evaporation rate is currently calculated in practice by using a quite complex Nomograph, a process rather tedious, time consuming and prone to inaccuracies. In response to such limitations, three analytical models for estimating the evaporation rate are developed and evaluated in this paper on the basis of the ACI 305R-10 Nomograph for “Hot Weather Concreting”. In this direction, several methods and techniques are employed including curve fitting via Genetic Algorithm optimization and Artificial Neural Networks techniques. The models are developed and tested upon datasets from two different countries and compared to the results of a previous similar study. The outcomes of this study indicate that such models can effectively re-develop the Nomograph output and estimate the concrete evaporation rate with high accuracy compared to typical curve-fitting statistical models or models from the literature. Among the proposed methods, the optimization via Genetic Algorithms, individually applied at each estimation process step, provides the best fitting result.
The use of huge quantity of natural fine aggregate (NFA) and cement in civil construction work which have given rise to various ecological problems. The industrial waste like Blast furnace slag (GGBFS), fly ash, metakaolin, silica fume can be used as partly replacement for cement and manufactured sand obtained from crusher, was partly used as fine aggregate. In this work, MATLAB software model is developed using neural network toolbox to predict the flexural strength of concrete made by using pozzolanic materials and partly replacing natural fine aggregate (NFA) by Manufactured sand (MS). Flexural strength was experimentally calculated by casting beams specimens and results obtained from experiment were used to develop the artificial neural network (ANN) model. Total 131 results values were used to modeling formation and from that 30% data record was used for testing purpose and 70% data record was used for training purpose. 25 input materials properties were used to find the 28 days flexural strength of concrete obtained from partly replacing cement with pozzolans and partly replacing natural fine aggregate (NFA) by manufactured sand (MS). The results obtained from ANN model provides very strong accuracy to predict flexural strength of concrete obtained from partly replacing cement with pozzolans and natural fine aggregate (NFA) by manufactured sand.
This research presents the optimization techniques for reinforced concrete waffle slab design because the EC2 code cannot provide an efficient and optimum design. Waffle slab is mostly used where there is necessity to avoid column interfering the spaces or for a slab with large span or as an aesthetic purpose. Design optimization has been carried out here with MATLAB, using genetic algorithm. The objective function include the overall cost of reinforcement, concrete and formwork while the variables comprise of the depth of the rib including the topping thickness, rib width, and ribs spacing. The optimization constraints are the minimum and maximum areas of steel, flexural moment capacity, shear capacity and the geometry. The optimized cost and slab dimensions are obtained through genetic algorithm in MATLAB. The optimum steel ratio is 2.2% with minimum slab dimensions. The outcomes indicate that the design of reinforced concrete waffle slabs can be effectively carried out using the optimization process of genetic algorithm.
Construction Materials (Paints) in Civil EngineeringLavish Kashyap
This file will provide you information about various types of Paints in Civil Engineering field under Construction Materials.
It will be very useful for all Civil Engineering students who wants to search about various Construction Materials used in Civil Engineering field.
Paint is a vital construction material used for protecting surfaces and enhancing the aesthetic appeal of buildings and structures. It consists of several components, including pigments (for color), binders (to hold the pigment together), solvents or thinners (to adjust viscosity), and additives (to improve properties like durability and drying time).
Paint is one of the material used in Civil Engineering field. It is especially used in final stages of construction project.
Paint plays a dual role in construction: it protects building materials and contributes to the overall appearance and ambiance of a space.
3. • Tkinter: Tkinter is the Python interface to the
Tk GUI toolkit shipped with Python. We would
look this option in this chapter.
• wxPython: This is an open-source Python
interface for wxWindows
• JPython: JPython is a Python port for Java
which gives Python scripts seamless access to
Java class libraries on the local machine
4. Tkinter Programming
• Tkinter is the standard GUI library for Python. Python when
combined with Tkinter provides a fast and easy way to
create GUI applications. Tkinter provides a powerful object-
oriented interface to the Tk GUI toolkit.
• Creating a GUI application using Tkinter is an easy task. All
you need to do is perform the following steps −
– Import the Tkinter module.
– Create the GUI application main window.
– Add one or more of the above-mentioned widgets to the GUI
application.
– Enter the main event loop to take action against each event
triggered by the user.
6. Tkinter Widgets
• Tkinter provides various controls, such as
buttons, labels and text boxes used in a GUI
application. These controls are commonly
called widgets.
• There are currently 15 types of widgets in
Tkinter. We present these widgets as well as a
brief description in the following table −
7. Operator Description
Button The Button widget is used to display buttons in your application.
Canvas The Canvas widget is used to draw shapes, such as lines, ovals, polygons and rectangles, in your
application.
Checkbutton The Checkbutton widget is used to display a number of options as checkboxes. The user can select
multiple options at a time.
Entry The Entry widget is used to display a single-line text field for accepting values from a user.
Frame The Frame widget is used as a container widget to organize other widgets.
Label The Label widget is used to provide a single-line caption for other widgets. It can also contain
images.
Listbox The Listbox widget is used to provide a list of options to a user.
Menubutton The Menubutton widget is used to display menus in your application.
Menu The Menu widget is used to provide various commands to a user. These commands are contained
inside Menubutton.
Message The Message widget is used to display multiline text fields for accepting values from a user.
Radiobutton The Radiobutton widget is used to display a number of options as radio buttons. The user can
select only one option at a time.
Scale The Scale widget is used to provide a slider widget.
Scrollbar The Scrollbar widget is used to add scrolling capability to various widgets, such as list boxes.
Text The Text widget is used to display text in multiple lines.
Toplevel The Toplevel widget is used to provide a separate window container.
Spinbox The Spinbox widget is a variant of the standard Tkinter Entry widget, which can be used to select
from a fixed number of values.
PanedWindow A PanedWindow is a container widget that may contain any number of panes, arranged
horizontally or vertically.
LabelFrame A labelframe is a simple container widget. Its primary purpose is to act as a spacer or container for
complex window layouts.
tkMessageBox This module is used to display message boxes in your applications.
8. Standard attributes
• Let us take a look at how some of their common
attributes.such as sizes, colors and fonts are
specified.
– Dimensions
– Colors
– Fonts
– Anchors
– Relief styles
– Bitmaps
– Cursors
13. Geometry Management
• All Tkinter widgets have access to specific geometry
management methods, which have the purpose of
organizing widgets throughout the parent widget area.
Tkinter exposes the following geometry manager
classes: pack, grid, and place.
– The pack() Method - This geometry manager organizes
widgets in blocks before placing them in the parent
widget.
– The grid() Method - This geometry manager organizes
widgets in a table-like structure in the parent widget.
– The place() Method -This geometry manager organizes
widgets by placing them in a specific position in the parent
widget.
15. Canvas
• The Canvas is a rectangular area intended for drawing pictures or
other complex layouts. You can place graphics, text, widgets or
frames on a Canvas.
• program3
24. Bring Image
Program
# Putting a gif image on a canvas with Tkinter
from Tkinter import *
root=Tk()
# create the canvas, size in pixels
canvas = Canvas(width = 300, height = 200, bg = 'yellow')
# pack the canvas into a frame/form
canvas.pack(expand = YES, fill = BOTH)
# load the .gif image file
# put in your own gif file here, may need to add full path
gif1 = PhotoImage(file = 'dw.gif')
# put gif image on canvas
# pic's upper left corner (NW) on the canvas is at x=50 y=10
canvas.create_image(50, 10, image = gif1, anchor = NW)
# run it ...
root.mainloop()