Layout management in Tkinter

Slides:



Advertisements
Similar presentations
M3 Feature Test Contains M3 features only Layout Test 1: Two Content Layout Left Column Text – This text has been formatted directly Right Column Text.
Advertisements

LEGO CASE BY SOC. Phone building Lets build this phone First you will build you base of the phone the (key pad) Next you will build the base for the head.
Tk. Toolkit n Wish - windowing shell –touch fileName –chmod +x fileName –xedit fileName & –#!/usr/local/bin/wish n Widgets - eg Buttons, Labels, Frames.
Tk Widgets This material is best on several sources –Slides by Dr. Ernest J. Friedman-Hill –various Tcl/Tk books.
Beginning to use the language of position. Four children stand in a row. Children discuss who is at the front/first in the row? Who is behind? Who is.
Noadswood Science,  To know how to use Python to produce windows and colours along with specified co-ordinates Sunday, April 12, 2015.
Technologies for web publishing Ing. Václav Freylich Lecture 6.
19-Jun-15 Ruby GUI Toolkits. Available GUI toolkits The Tk GUI toolkit is a part of the Ruby distribution Tk is badly documented, does not support native.
5.7 – Completing the Square. Completing the square Easy case x² + 8x – 5 = 9 x² + 8x – 5 = 9 x² + 8x = 14 x² + 8x + 16 = (x+4)² = 30 (x+4) = ±√30.
Microsoft Excel Online Learning. What is Excel? Microsoft PowerPoint is for Presentations Microsoft Word is for Text, Writing, and Typing Papers Microsoft.
Escape A sticky man adventure using TKINTER python module By: Channing Burgess.
COMPSCI 101 Principles of Programming
18. Python - GUI Programming (Tkinter)
Guide to Programming with Python Chapter Ten GUI Development: The Mad Lib Program.
Newspaper Article.  Log on to your PC using your username and password  Go to the Start menu and select Microsoft Office Publisher  Once you have opened.
Photography Techniques By: Eneida Leyva. Low Perspective This shows a low perspective because this picture shows a plant from the roots up.
Photo Gallery A photo gallery is a web page that contains a collection of graphics arranged in a specific layout. Microsoft FrontPage provides four different.
 Definition  Components  Advantages  Limitations Contents  Introduction Introduction  Inserting a Table Inserting a Table  Drawing a Table Drawing.
Chapter 8 Introductory Geometry Section 8.6 Viewing and Drawing Solid Figures.
PYTHON GUI PROGRAMMING
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 20 Graphical User Interface (GUI)
Lecture 10: Toolkits: Intrinsics, Callbacks, Resources, Widget hierarchies, Geometry management Brad Myers Advanced User Interface Software 1© 2013.
Tkinter Canvas.
© Copyright 2012 by Pearson Education, Inc. All Rights Reserved. Chapter 9 GUI Programming Using Tkinter 1.
How the Session Works Outline Practical on arrival Talk 1 Reflect on practical Clarify concepts Practical exercises at your own pace Talk 2: Further concepts.
Newspaper Article.  This article will need two picture boxes  To insert a Picture Box click on Insert in the toolbar and scroll down to Picture. Select.
Tkinter Basics. Initial Stuff To get the package: from tkinter import * To make a window, give it a title and operate it: windowVar = Tk() windowVar.title(“your.
Graphics Programming with Python. Many choices Python offers us several library choices:  Tkinter  WxPython  PyQt  PyGTK  Jython  And others...
Step 1: Place x 2 term and constant into the box 2x 2 2 PROBLEM: 2x 2 + 5x + 2.
Guide to Programming with Python
Spreadsheet Vocabulary Multimedia Lab Kathleen Pape.
XP IT INSTRUCTOR :AHMAD HIRZALLAH 1 Microsoft Office FrontPage 2003 Creating Tables and Frames.
Clicker quiz 11/5/13 CSE 1102 Fall A. a FlowLayout B. a BorderLayout C. a GridGrouping D. a JSplitPane E. a GridLayout Suppose we want to to lay.
1 HTML. 2 Full forms WWW – world Wide Web HTTP – Hyper Text Transfer Protocol HTML – Hyper Text Markup Language.
COMPSA Exam Prep Session by Paul Allison On: April 8th from 1:30-3:00 Location TBA Winter 2016CISC101 - Prof. McLeod1.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 5 1 Microsoft Office FrontPage 2003 Tutorial 5 – Creating Tables and Frames.
Topic one text Topic two text Topic three text Topic four text
Topics Graphical User Interfaces Using the tkinter Module
What Comes in Arrays?.
Graphical User Interfaces (GUIs)
Animated picture effects for PowerPoint slides
Chap 7. Building Java Graphical User Interfaces
Ruby GUI Toolkits 21-Sep-18.
GUI Using Python.
Graphical User Interfaces -- Introduction
This Week: Tkinter for GUI Interfaces Some examples
Tkinter GUIs Computer Science and Software Engineering
Topic one text Topic two text Topic three text Topic four text
QUESTION INSTRUCTIONS
Tkinter Widgets CS 260 Dick Steflik.
TAB ONE TAB TWO TAB THREE TAB FOUR TAB FIVE
TKinter CS-360 Dick Steflik.
TEXT TEXT TEXT Animated rectangles curve up and grow in sequence
QUESTION INSTRUCTIONS
گزارش فعالیت سه ماهه دبستان ابن سینا
Periodic Table Basics.
Topics Graphical User Interfaces Using the tkinter Module
Empower Support Freedom Inspire Together
Lesson 1: Google Sheets Tour
Python – Tkinter Windows Application
Tkinter Button import tkinter as tk root = tk.Tk()
Tkinter Label תווית The Label widget is a standard Tkinter widget used to display a text or image on the screen. import tkinter as tk root = tk.Tk() lb.
Tkinter Event. אירוע. Events and Bindings widget.bind(event, handler)
Tkinter Tkinter is a GUI (graphical user interface) widget set for Python. The Tkinter module (“ToolKit interface”) is the standard Python interface to.
Layout Organization and Management
Please Do Now / Dec. 2, 15 Log into computer Go to
Graphical User Interface
Tkinter User Input Form
Tkinter Canvas   Canvas widget to display graphical elements like lines or text.   Peymer Anatoly.
Dynamic Learning Activity HPI Practitioner Workshop April 4, 2018
Presentation transcript:

Layout management in Tkinter Absolute positioning. import tkinter as tk root = tk.Tk() lb1 = tk.Label(root,text="Hello, World !") lb1.place(x=20, y=50) root.mainloop() 20x50 Peymer Anatoly

Tkinter Pack Geometry Manager Python - Widget JAVA – Components Microsoft (C#) - Controls The Pack geometry manager packs widgets in rows or columns. You can use options like fill, expand, and side to control this geometry manager. Peymer Anatoly

Tkinter Pack Geometry Manager import tkinter as tk root = tk.Tk() lb1 = tk.Label(root, bg='red',text="Hello, World !") lb2 = tk.Label(root,bg='yellow',text="Hello, World !") lb1.pack(side="left") lb2.pack(side="right") root.mainloop() Peymer Anatoly

Tkinter Pack Geometry Manager import tkinter as tk root = tk.Tk() lb1 = tk.Label(root, bg='red', text=" Red ") lb2 = tk.Label(root,bg='yellow',text=" Yellow ") lb3 = tk.Label(root,bg='green', text=" Green ") lb1.pack() lb2.pack() lb3.pack() root.mainloop() Peymer Anatoly

Tkinter Pack Geometry Manager import tkinter as tk root = tk.Tk() lb1 = tk.Label(root, bg='red', text=" Red ") lb2 = tk.Label(root,bg='yellow',text=" Yellow ") lb3 = tk.Label(root,bg='green', text=" Green ") lb1.pack(side = tk.LEFT) lb2.pack(side = tk.LEFT) lb3.pack(side = tk.LEFT) root.mainloop() side: TOP (default), BOTTOM, LEFT, or RIGHT. Peymer Anatoly

Tkinter Pack Geometry Manager lb.pack() lb.pack(expand="YES", fill="x" ) lb.pack(expand="YES", fill="y" ) lb.pack(expand="YES", fill="both" ) Peymer Anatoly

Tkinter Frame. The Frame widget is very important for the process of grouping and organizing other widgets. import tkinter as tk root = tk.Tk() frame = tk.Frame(root) frame.pack(side = tk.LEFT) redbutton = tk.Button(frame, text="Red", fg="red") redbutton.pack(side = tk.LEFT) greenbutton = tk.Button(frame, text="Brown", fg="brown") greenbutton.pack(side = tk.LEFT) bluebutton = tk.Button(frame, text="Blue", fg="blue") bluebutton.pack(side = tk.LEFT) root.mainloop() Peymer Anatoly

Arrange the widgets according to the picture. Tkinter Arrange the widgets according to the picture. Easy Peymer Anatoly

Arrange the widgets according to the picture. Tkinter Arrange the widgets according to the picture. Easy import tkinter as tk root = tk.Tk() f_1 = tk.Frame(root,width=50,height=50,bg="Yellow") f_2 = tk.Frame(root,width=50,height=50,bg="Blue") f_3 = tk.Frame(root,width=50,height=50,bg="Green") f_4 = tk.Frame(root,width=50,height=50,bg="Red") f_1.pack() f_2.pack() f_3.pack() f_4.pack() root.mainloop() Peymer Anatoly

Arrange the widgets according to the picture. Tkinter Arrange the widgets according to the picture. Easy Peymer Anatoly

Arrange the widgets according to the picture. Tkinter Arrange the widgets according to the picture. Easy import tkinter as tk root = tk.Tk() f_1 = tk.Frame(root,width=50,height=50,bg="Yellow") f_2 = tk.Frame(root,width=50,height=50,bg="Blue") f_3 = tk.Frame(root,width=50,height=50,bg="Green") f_4 = tk.Frame(root,width=50,height=50,bg="Red") f_1.pack(side=tk.LEFT) f_2.pack(side=tk.LEFT) f_3.pack(side=tk.LEFT) f_4.pack(side=tk.LEFT) root.mainloop() Peymer Anatoly

Arrange the widgets according to the picture. Tkinter Arrange the widgets according to the picture. Medium Peymer Anatoly

Arrange the widgets according to the picture. Tkinter Arrange the widgets according to the picture. Medium import tkinter as tk root = tk.Tk() f_1 = tk.Frame(root,width=50,height=50,bg="Yellow") f_2 = tk.Frame(root,width=50,height=50,bg="Blue") f_3 = tk.Frame(root,width=50,height=50,bg="Green") f_4 = tk.Frame(root,width=50,height=50,bg="Red") f_1.pack(side=tk.LEFT) f_2.pack(side=tk.RIGHT) f_3.pack(side=tk.TOP) f_4.pack(side=tk.BOTTOM) root.mainloop() Peymer Anatoly

Arrange the widgets according to the picture. Tkinter Arrange the widgets according to the picture. Hard Peymer Anatoly

Arrange the widgets according to the picture. Tkinter Arrange the widgets according to the picture. Hard import tkinter as tk root = tk.Tk() f_01=tk.Frame(root) f_02=tk.Frame(root) f_1=tk.Frame(f_01,width=50,height=50,bg="Yellow") f_2=tk.Frame(f_01,width=50,height=50,bg="Blue") f_3=tk.Frame(f_02,width=50,height=50,bg="Green") f_4=tk.Frame(f_02,width=50,height=50,bg="Red") f_01.pack(side=tk.LEFT) f_02.pack(side=tk.LEFT) f_1.pack() f_2.pack() f_3.pack() f_4.pack() root.mainloop() Peymer Anatoly

Arrange the widgets according to the picture. Tkinter Arrange the widgets according to the picture. יצירתיות Peymer Anatoly