Tkinter User Input Form

Slides:



Advertisements
Similar presentations
Excel Spread Sheet- plug in dates along top row skipping column A.
Advertisements

Computer Science 112 Fundamentals of Programming II User Interfaces
Tk Widgets This material is best on several sources –Slides by Dr. Ernest J. Friedman-Hill –various Tcl/Tk books.
- 640 x x (PRESENTER AREA) Subject Name Presenter: Firstname Surname subtitles Choose one presenter view you like and delete other presenter.
An Introduction to Spreadsheets Using Number Magic Malcolm Wilson ICT Curriculum Support Teacher (Primary) Falkirk Council.
Noadswood Science,  To know how to use Python to produce windows and colours along with specified co-ordinates Sunday, April 12, 2015.
Introduction to Microsoft Excel 2010 Chapter Extension 3.
This Presentation Contains Narration and Notes To hear the narration, turn on your speakers or plug in headphones. If you would like to view this slideshow.
2 Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Navigating in R12.x Oracle Applications.
Review of last session The Weebly Dashboard The Weebly Dashboard Controls your account and your sites Controls your account and your sites From here you.
Spreadsheet. Objectives Create a new blank workbook. Create a new blank workbook. Identify user interface elements that you can use to accomplish basic.
Computer Science 111 Fundamentals of Programming I User Interfaces Introduction to GUI programming.
Unit J: Creating a Database Microsoft Office Illustrated Fundamentals.
Getting started (For the absolute beginner: download and install python) Task 1: Creating 3 widgets: a label, text entry and a button (and ‘PACK’) Task.
COMPSCI 101 Principles of Programming
Guide to Programming with Python Chapter Ten GUI Development: The Mad Lib Program.
2 Copyright © 2007, Oracle. All rights reserved. Navigating in R12 Oracle Applications.
Computer Science 111 Fundamentals of Programming I Model/View/Controller and Data model design.
PYTHON GUI PROGRAMMING
Computer Science 112 Fundamentals of Programming II Command Buttons and Responding to Events.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 20 Graphical User Interface (GUI)
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
© Paradigm Publishing Inc. ACCESS CREATING QUERIES, FORMS, AND REPORTS Section 3.
Online Surveys Jacqui James and Malcolm Roberts School of Education.
Guide for Mahara My Views PY1 team 3 - Yihong Huo, Jian Ren, Poonam Kala 1Guide of My Views - Team 3.
Graphical User Interface You will be used to using programs that have a graphical user interface (GUI). So far you have been writing programs that have.
Title: Arial Bold 95 Pts. Subtitle (Optional): Arial Bold 65 Pts. Authors: Arial 40 Pts. Institutions: Arial 40 Pts. Secondary Heading: Arial 40 Pts. Standard.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
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.
Lesson 3 - The Entry Box.. Last week We produced a Tkinter window with a label and a button Now we are going to create a new program that creates a Button.
Graphics Programming with Python. Many choices Python offers us several library choices:  Tkinter  WxPython  PyQt  PyGTK  Jython  And others...
Creating visual interfaces in python
Presenter | Presenter 00 Month 2004 Title Sample *1 © Copyright THUS Group plc All rights reserved.
Online Surveys Jacqui James Malcolm Roberts School of Education.
Guide to Programming with Python
Please Remember To Use all fonts, sizes, and colors as indicated on the template Enter text directly on a slide OR type directly in the “Outline” tab REMOVE.
Unit 24 Learning Spreadsheet Essentials Starting on page 287  Mrs. Jefcoat  Business Technology Applications Unit 24: Lessons
How to make a Jeopardy type game in PowerPoint. Open a blank PowerPoint.
Charts Chart. Choosing what to show in a Chart To show cost of individual spend in Leeds: Highlight items and price ONLY (no headings or totals).
COMPSA Exam Prep Session by Paul Allison On: April 8th from 1:30-3:00 Location TBA Winter 2016CISC101 - Prof. McLeod1.
COMPSA Exam Prep Session On: April 8th from 1:30-3:00 Location TBA Winter 2016CISC101 - Prof. McLeod1.
Innovation Intelligence ® Feb Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. GUI design Controls Toplevel.
Topics Graphical User Interfaces Using the tkinter Module
Graphical User Interfaces (GUIs)
My Final Project: Calorie Counter
GUI Using Python.
Fundamentals of Python: From First Programs Through Data Structures
Tkinter Python User Interface
This Week: Tkinter for GUI Interfaces Some examples
Tkinter Widgets CS 260 Dick Steflik.
TAB ONE TAB TWO TAB THREE TAB FOUR TAB FIVE
Working with PowerForms
DB Implementation: MS Access Forms
TITLE OF PRESENTATION TOPIC HEADER TOPIC HEADER TOPIC HEADER
موضوع بحث: تعریف علم اصول جلسه 43.
اشاره به نتایج قیاس های فقهی گاهی، حکم شرعی است
علم اصول، «نفس قواعد» است نه «علم به قواعد»
Fundamentals of Programming I Windows, Labels, and Command Buttons
Whatcha doin'? Aims: Begin to create GUI applications. Objectives:
Computer Science 111 Fundamentals of Programming I User Interfaces
Computer Science 111 Fundamentals of Programming I
Python – Tkinter Windows Application
Title of presentation | Presentation by [Enter details in 'Header & Footer' field 18/05/2019.
Unit J: Creating a Database
قاعده لا ضرر، تنها در شبهات حکمیه جاری است
جلسه 34.
CREATING QUERIES, FORMS, AND REPORTS Section 3
Microsoft PowerPoint Tutorial Graphs BIS 101 Spring 2018.
Use this slide to present information in bullet form.
1 ج : اشاره بعضی از اصولیون به تعریف ترکیبی آخوند با «یک لفظ»
Presentation transcript:

Tkinter User Input Form

Planning We need to plan out an input form for a person to create a username for an online account The form has to have A suitable title A heading Input areas for username, first name and surname A button to submit details A button to clear the details from the form A Python program then has to confirm what was entered

.grid layout Your form should look a bit like this;

.grid layout So our plan will look like this

.grid layout So our structure will consist of A window (the root) to contain all the form Frame 1 that will hold the form name Frame 2 that will hold rows for each type of input box (three of them – username, 1st name, last name) The next row outside of the frames will hold two buttons, 1 in each column

Import tkinter from tkinter import *

Submit function def submit(): print(“Username”,username.get()) print(“First name”,firstname.get()) print(“Surname”,surname.get())

Clear function def clear(): username.delete(0, END) firstname.delete(0, END) surname.delete(0, END) username.focus_set()

The window root = Tk() root.geometry(“270x240”) root.title(“Student Details”) root.resizable(False,False) root.configure(background = “Light Blue”)

Setting up the frames #the heading frame frame_heading = Frame(root) frame_heading.grid(row = 0, column=0, columnspan=2, padx=30, pady=5) #the data entry frame frame_entry = Frame(root) frame_entry.grid(row = 1, column=0, columnspan=2, padx=25, pady=10)

Frame 1 #entering the details for the frame_heading Label(frame_heading, text = “Student Details Form”, font = (‘Arial’, 16)).grid(row = 0, column = 0, padx = 0, pady = 5)

Frame2 – column 0 (labels) Label(frame_entry, text = “Username: ”).grid(row = 0, column = 0, padx = 10, pady = 5) Label(frame_entry, text = “First Name: ”).grid(row = 1, column = 0, padx = 10, pady = 5) Label(frame_entry, text = “Surname: ”).grid(row = 2, column = 0, padx = 10, pady = 5)

Frame2 – column 1 (input boxes) username = Entry(frame_entry, width =15, bg = “white”) username.grid(row = 0, column = 1, padx = 5, pady = 5) firstname = Entry(frame_entry, width =15, bg = “white”) firstname.grid(row = 1, column = 1, padx = 5, pady = 5) surname = Entry(frame_entry, width =15, bg = “white”) surname.grid(row = 2, column = 1, padx = 5, pady = 5)

Placing the buttons submit_button = Button(root, text=“Submit”, width = 7, command=submit) submit_button.grid(row=2, column=0, padx=0, pady=5) clear_button = Button(root, text=“Clear”, width = 7, command=clear) clear_button.grid(row=2, column=1, padx=0, pady=5)

To get it running root.mainloop()

To improve this, we could also copy the delete function onto the end of the submit function, so that when we submitted our details, it clears the form ready for the next person’s details to be input.