Graphical User Interfaces (GUIs)

Slides:



Advertisements
Similar presentations
Computer Science 112 Fundamentals of Programming II User Interfaces
Advertisements

Windows Test Review.
Designing a Graphical User Interface (GUI) 10 IST – Topic 6.
User Interface. What is a User Interface  A user interface is a link between the user and the computer. It allows the user and the computer to communicate.
Noadswood Science,  To know how to use Python to produce windows and colours along with specified co-ordinates Sunday, April 12, 2015.
Exploring the Basics of Windows XP. Objectives Start Windows XP and tour the desktop Explore the Start menu Run software programs, switch between them,
User Interfaces. User Interface What do we mean by a user interface? The user is the person who is using the computer. A user interface is what he or.
Exploring the Basics of Windows XP
Write today’s date and title in the front of your book. Underline it.
Fundamentals of Computer Hardware & software
COMPSCI 101 Principles of Programming
Peter Andreae Python for Level 3 CS4HS see website: ecs.vuw.ac.nz/Main/PythonForSchools.
Computing Science 1P Lecture 18: Friday 2 nd March Simon Gay Department of Computing Science University of Glasgow 2006/07.
Integrated Development Environment (IDE)
XP New Perspectives on Windows XP Tutorial 1 Exploring the Basics.
Output Design. Output design  Output can be: Displayed on a screen/VDU/monitor. Printed on paper as hard copy. Sound.
PC204 Lecture 9 Conrad Huang Genentech Hall, N453A x
PYTHON GUI PROGRAMMING
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 20 Graphical User Interface (GUI)
Python Programming Graphical User Interfaces Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
Computing Science 1P Lecture 17: Friday 23 rd February Simon Gay Department of Computing Science University of Glasgow 2006/07.
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.
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.
Define and describe operating systems which contain a Command Line Interface (CLI) Define and describe operating systems which contain a Graphical User.
Graphics Programming with Python. Many choices Python offers us several library choices:  Tkinter  WxPython  PyQt  PyGTK  Jython  And others...
Creating visual interfaces in python
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
Catholic University College of Ghana Fiapre-Sunyani INFORMATION TECHNOLOGY I Audrey Asante, Faculty of ICST Graphic User Interface Tutorials and Documentation.
Human Computer Interface INT211
A desktop environment typically consists of icons, windows, toolbars, folders, wallpapers and desktop widgets(text box, button)
Operating System Concepts Three User Interfaces Command-line Job-Control Language (JCL) Graphical User Interface (GUI)
COMPUTER III. Fundamental Concepts of Programming Control Structures Sequence Selection Iteration Flowchart Construction Introduction to Visual Basic.
Types of Software Chapter 2.
Event Binding Make something to react when something happens to it, like pressing a key, it’s called event binding. Events: things that occur while a program.
GCSE ICT User Interfaces. User interfaces The way in which the user of a computer communicates with the machine is called the Human- Computer Interface.
Allows the user and the computer to communicate with each other.
CST 1101 Problem Solving Using Computers
Topics Graphical User Interfaces Using the tkinter Module
Event Loops and GUI Intro2CS – weeks
CompSci 230 S Software Construction
The Desktop Screen image displayed when a PC starts up A metaphor
X-term Tutorial.
Introduction to Event-Driven Programming
Goals Give student some idea what this class is about
Event Driven Programming Dick Steflik
Programming for Geographical Information Analysis: Core Skills
Chapter 3 Software Interfaces.
Fundamentals of Python: From First Programs Through Data Structures
Exploring the Basics of Windows XP
Systems Software Keywords Operating Systems
User Interfaces The human computer interface is what allows the user to communicate/Interact with the computer and is often called simply the user interface.
Cmake Primer.
Human Computer Interface
Human Computer Interface
Exploring the Basics of Windows XP
Human Computer Interface
Human Computer Interface
Review: Applying Computer Basics
User Interfaces and Libraries
Computer Science 111 Fundamentals of Programming I User Interfaces
Topics Graphical User Interfaces Using the tkinter Module
LING 408/508: Computational Techniques for Linguists
X-term Tutorial.
Software - Operating Systems
Programming for Geographical Information Analysis: Core Skills
3.1 System Software.
University of Warith AL-Anbiya’a
Human-computer interaction
An Introduction to the Windows Operating System
Fundamentals of Computer Hardware & software
Presentation transcript:

Graphical User Interfaces (GUIs) In general, Python isn't much used for user interfaces, but there's no reason for not doing so. Build up WIMP (Windows; Icons; Menus; Pointers) Graphical User Interfaces (GUIs). The default package to use is TkInter. This is an interface to the basic POSIX language Tcl ("Tickle", the Tool Command Language) and its GUI library Tk. Also more native-looking packages like wxPython: https://www.wxpython.org/

Basic GUI import tkinter root = tkinter.Tk() # Main window. c = tkinter.Canvas(root, width=200, height=200) c.pack() # Layout c.create_rectangle(0, 0, 200, 200, fill="blue") tkinter.mainloop() # Wait for interactions.

Event Based Programming Asynchronous programming, where you wait for user interactions. In Python, based on callbacks: where you pass a function into another, with the expectation that at some point the function will be run. You register or bind a function with/to an object on the GUI. When an event occurs, the object calls the function.

Simple event import tkinter def run(): pass root = tkinter.Tk() menu_bar = tkinter.Menu(root) root.config(menu=menu_bar) model_menu = tkinter.Menu(menu_bar) menu_bar.add_cascade(label="Model", menu=model_menu) model_menu.add_command(label="Run model", command=run) tkinter.mainloop() We will come back to event based programming when we look at JavaScript.

The user experience Many people design for geeks. Users learn by trying stuff - they rarely read manuals, so think carefully about what the default behavior of any function should be. We need to design for the general public, but make advanced functions available for those that want them. We should try to help the user by... Using familiar keys and menus (e.g. Ctrl + C for copy). Including help systems and tutorials.

Designing for users At every stage when designing the GUI, think "is it obvious what this does?" Make all screens as simple as possible. Turn off functionality until needed, e.g.: model_menu.entryconfig("Run model", state="disabled") # Until the user has chosen files, then: model_menu.entryconfig("Run model", state="normal") Hide complex functionality and the options to change defaults in ‘Options’ menus. Most of all consult and test. There is a formal element of software development called 'usability testing' in which companies watch people trying to achieve tasks with their software.