This text is used together with Mark Pilgrims book Dive Into Python 3 for the Arthead course Python Fundamentals.
|
|
- Elfrieda Tate
- 5 years ago
- Views:
Transcription
1
2 2
3 About this text This text is used together with Mark Pilgrims book Dive Into Python 3 for the Arthead course Python Fundamentals. The first part is written for Python 2 and at the end there is a section for Python 3. This document is copyright by Arthead AB, all rights reserved. This text can only be distributed to participants to the course Python Fundamentals by Arthead. Permission is hereby granted for course participants to make hardcopies and freely distribute the material herein under the following conditions: The copyright and this legal notice must appear in any copies of this document made in whole or in part. None of material herein can be sold or otherwise distributed for commercial purposes without written permission of the copyright holder. 3
4 Writing GUI s in Python 2 To create a graphical user interface (GUI) in Python we will use a framework. There are a number to pick from but here we will look at Python s standard GUI library, Tkinter. What is Tkinter? The Tkinter module ( Tk interface ) is the standard Python interface to the Tk GUI toolkit from Scriptics(formerly developed by Sun Labs). Both Tk and Tkinter are available on most Unix platforms, as well as on Windows and Macintosh systems. Starting with the 8.0 release, Tk offers native look and feel on all platforms. Tkinter consists of a number of modules. The Tk interface is provided by a binary extension module named _tkinter. This module contains the low-level interface to Tk, and should never be used directly by application programmers. It is usually a shared library (or DLL), but might in some cases be statically linked with the Python interpreter. The public interface is provided through a number of Python modules. The most important interface module is the Tkinter module itself. To use Tkinter, all you need to do is to import the Tkinter module: import Tkinter Or, more often: from Tkinter import * The Tkinter module only exports widget classes and associated constants, so you can safely use the from-inform in most cases. If you prefer not to, but still want to save some typing, you can use import-as: as we will do in this text A First Program Let s create a small program that will display a window with a text label widget inside of it. #Create the window widget. #Crate a label widget that is a child of window label = tk.label(window, text = "Hi GUI") #Pack it to make it visible label.pack() #Enter the main loop making the window visible First we import the Tkinter module. It contains all classes, functions and other things needed to work with the Tk toolkit. 4
5 In the main function the first thing we do is to create a window widget. This is an ordinary window with a title bar and other decoration that we would expect from a window. You should only create one window widget per program and it must be created before all other widgets. Next we create the label widget and make it a child of window. We also provide the text for this widget. Next we make a call to a function called pack. This is one out of three methods we can use to add widgets to the window. We will soon look at them in more detail but for now this is what we need to do to add the label widget to the window. The last call is to the main loop of the window widget. This is the loop that will be executed until we exit the window. This is needed so Tkinter can process different events that we might want to respond to. More on this too a bit later. This is what the window looks like: Tkinter Geometry Managers Tkinter contains three different geometry managers that will help us handle where and how widgets are placed in the window. These are pack, grid and place. Let us examine these in more detail. Pack Geometry Manager What the pack manager does it that it places its children (the widgets) on top of each other in columns or side by side in rows. There are three situations when we want to use this manager and they are: 1. Put the widget inside a frame (or any other container widget), and have it fill the entire frame (or container) 2. Place a number of widgets on top of each other 3. Place a number of widgets side by side Look at the example below. listbox = tk.listbox(window) listbox.pack() for i in range(20): listbox.insert(tk.end,str(i)) This will result in a program that looks like this: 5
6 The listbox widget will by default make room to display 10 items. In this case we insert 20 items. If the user tries to enlarge the window to see the rest the result will look like this: What we need to do is to let the listbox fill the container and let it expand. We can do this by providing the fill and expand options to pack: listbox.pack(fill=tk.both, expand= 1) The fill BOTH indicates that we want the listbox to fill its container both vertically and horizontally. Instead we can pass in X to only fill it vertically and Y to only fill it horizontally. Expand tells the manager to assign more space to the widget box. If the parent widget is made larger than necessary to hold all packed widgets, any exceeding space is distributed among all widgets that have the expand option set to a non-zero value. 6
7 If we don t provide any arguments to pack the widgets will be place on top of each other like this: label = tk.label(window, text="red", bg="red", fg="white") label.pack() label = tk.label(window, text="green", bg="green", fg="black") label.pack() label = tk.label(window, text="blue", bg="blue", fg="white") label.pack() Or we can put them side by side if we use the side option wit pack: label = tk.label(window, text="red", bg="red", fg="white") label.pack(side=tk.left) label = tk.label(window, text="green", bg="green", fg="black") label.pack(side=tk.left) label = tk.label(window, text="blue", bg="blue", fg="white") label.pack(side=tk.left) If we use RIGHT for the green label we get this result The pack method is not always the best one and can be hard to handle in most situations. Let s assume we want to have two label widgets and two entry widgets (to let get user input) that looks like this: 7
8 If we used pack with no arguments it would look like this: We could use pack to make it work but it would involve several containers to get it right. Instead we can use the grid manager. Grid Geometry Manager The grid manager works with rows and columns making it very easy for us to place the widgets where we want them to be. In the example above we saw that placing four widgets with pack can be difficult so let us see how this can be done with the grid manager: label = tk.label(window, text= "Name:") label.grid(row=0) name = tk.entry(window) name.grid(row=0,column=1) label = tk.label(window, text= " ") label.grid(row=1) = tk.entry(window) .grid(row=1,column=1) Here we create a label and use the grid manager and pass in row 0 (the first row). We will not need to specify the column as it defaults to 0. Setting both row and column to zero will place this widget in the upper left corner of the window. Next we create an entry widget and place it on the same row (0) but in column 1. The next label will go on row 1 and column 0 (right below the first label) and the next entry will be placed at row 1 and column 1 right below the first entry. The result will be as we saw before. Empty rows and columns will be ignored so we could just as well have started at 10 or 50. 8
9 Note that widgets are centered in their cells. You can use the sticky option to change this. To see this better let us change the text in the second label to address: To make the labels justify to the left we can use the sticky option. Sticky uses N,S,E, and W to set the direction (North, South, East, and West). If we want to justify name to the left we use the stick option with W. label = tk.label(window, text= "Name:") label.grid(row=0,sticky=tk.w) This will give us this result: We can let a widget span over more than one cell. Here is an example of that: label = tk.label(window, text= "Name:") label.grid(row=0,sticky=tk.w) name = tk.entry(window) name.grid(row=0,column=1) label = tk.label(window, text= " address:") label.grid(row=1) = tk.entry(window) .grid(row=1,column=1) check = tk.checkbutton(window, text="remeber me...") check.grid(columnspan=2,row=2) button = tk.button(window, text="submit") button.grid(row=2,column=3) 9
10 The checkbox will span over the first two columns. If we draw a grid on top of the window this will be clearer and we can see how the checkbox spans over two columns. Column 0 Column 1 Column 2 Row 0 Row 1 Row 2 Columnspan 2 The Place Manager The place manager is the simplest and least useful of the three managers. It can be used with exact coordinates like this: label = tk.label(window, text= "First label:") label.place(x=10, y=30) label = tk.label(window, text= "Second label") label.place(x=100, y=34) This will produce a window like this: 10
11 Events and Bindings To make a GUI useful we need to be able to respond to events. This is done by binding a callback function to a widget and a particular event. Let us start with a simple form, just a label, an entry field and a button. label = tk.label(window,text = "Name: ") label.grid() #row and column defaults to 0 name = tk.entry(window) name.grid(row=0, column=1) button = tk.button(window, text="submit") button.grid(row=1,column=1,sticky=e) Now we want to react to when the user press the left mouse button over the button. We will do this by binding a callback function to this event. First we need to write the callback function. import tkmessagebox def buttoncallback(event): tkmessagebox.showinfo("say hi","hi there") We import the module tkmessagebox so we can display a message box. In the function (that takes one argument called event, more about this soon) we just display a message box with the title Say hi and the text Hi there. Now we want to bind this function to the event that the button was clicked. We can do this by calling a method called bind for the button. The bind method takes two arguments. The first one is what event to respond to and the second one is the function to call when this event occurs. 11
12 The events we can respond to are Event <Button-1> Description A mouse button is pressed over the widget. Button 1 is the leftmost button, button 2 is the middle button (where available), and button 3 the rightmost button. When you press down a mouse button over a widget, Tkinter will automatically grab the mouse pointer, and subsequent mouse events (e.g. Motion and Release events) will then be sent to the current widget as long as the mouse button is held down, even if the mouse is moved outside the current widget. The current position of the mouse pointer (relative to the widget) is provided in the x and y members of the event object passed to the callback. You can use ButtonPress instead of Button, or even leave it out completely: <Button-1>,<ButtonPress-1>, and <1> are all synonyms. For clarity, I prefer the <Button-1> syntax. <B1-Motion> <ButtonRelease-1> <Double-Button-1> <Enter> <Leave> <FocusIn> <FocusOut> <Return> The mouse is moved, with mouse button 1 being held down (use B2 for the middle button, B3 for the right button). The current position of the mouse pointer is provided in the x and y members of the event object passed to the callback. Button 1 was released. The current position of the mouse pointer is provided in the x and y members of the event object passed to the callback. Button 1 was double clicked. You can use Double or Triple as prefixes. Note that if you bind to both a single click (<Button- 1>) and a double click, both bindings will be called. The mouse pointer entered the widget (this event doesn t mean that the user pressed the Enter key!). The mouse pointer left the widget. Keyboard focus was moved to this widget, or to a child of this widget. Keyboard focus was moved from this widget to another widget. The user pressed the Enter key. You can bind to virtually all keys on the keyboard. For an ordinary 102-key PC-style keyboard, the special keys are Cancel (the Break key), BackSpace, Tab, Return(the Enter key), Shift_L (any Shift key), Control_L (any Control key), Alt_L (any Alt key),pause, Caps_Lock, Escape, Prior (Page Up), Next (Page Down), End, Home, Left, Up, Right,Down, Print, Insert, Delete, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, Nu m_lock, and Scroll_Lock. 12
13 <Key> A The user pressed any key. The key is provided in the char member of the event object passed to the callback (this is an empty string for special keys). The user typed an a. Most printable characters can be used as is. The exceptions are space (<space>) and less than (<less>). Note that 1 is a keyboard binding, while <1> is a button binding. <Shift-Up> <Configure> The user pressed the Up arrow, while holding the Shift key pressed. You can use prefixes like Alt, Shift, and Control. The widget changed size (or location, on some platforms). The new size is provided in the width and height attributes of the event object passed to the callback. We could pick the <Button-1> event for this but we would then respond to the mouse down part of the event and that would leave the button visually pressed down in our form. If we want to avoid this we could instead react to the <ButtonRelease-1> event. This will let the button come back up and when the mouse button is released our function will be called. We bind the event to the function like this: button.bind("<buttonrelease-1>", buttoncallback) When the button is pressed the buttoncallback function will be called and the message box will be displayed. If we want to pick up what is in the entry field in the function we will need to do two things. First is to bind a variable to the entry field so we can access the content of the field in the callback function. To be able to access the variable we will need to declare it global. Tkinter will provide a class called StringVar that we can use to bind a variable to the entry field. We can declare it like this: v = tk.stringvar() As mentioned we want this to be global so we must declare it above our callback function. But to able to declare it we must declare our window variable first. So we need to declare window global as well. Then we need to bind the variable v to the entry field. This is done when we create the entry object: name = tk.entry(window, textvariable=v) Last change we need to do to the program is to print the content of the variable v in the callback function. This is done by calling the member function get for the v object. 13
14 The full program now looks like this: import tkmessagebox v = tk.stringvar() def buttoncallback(event): tkmessagebox.showinfo("say hi","hi there " + v.get()) label = tk.label(window,text = "Name: ") label.grid() #row and column defaults to 0 name = tk.entry(window, textvariable=v) name.grid(row=0, column=1) button = tk.button(window, text="submit") button.grid(row=1,column=1,sticky=e) button.bind("<buttonrelease-1>", buttoncallback) if name == ' main ': main() And the result: Using global variables like this is of course not how we want to create a stable program. A better solution is to wrap all this into a class. 14
15 Widgets There are a number if widgets included in Tkinter. Let us take a brief look at them. Canvas The canvas can be used to draw graphics on. You can see it as a drawing surface. This little demo shows how it can be used: """Simple line drawing demo.""" b1 = "up" xold, yold = None, None def b1down(event): global b1 b1 = "down" # you only want to draw when the button is down # because "Motion" events happen -all the time- def b1up(event): global b1, xold, yold b1 = "up" xold = None yold = None # reset the line when you let go of the button def motion(event): if b1 == "down": global xold, yold if xold is not None and yold is not None: event.widget.create_line(xold,yold,event.x,event.y,smooth=tk.true) # here's where you draw it. smooth. neat. xold = event.x yold = event.y drawing_area = tk.canvas(window) drawing_area.pack() drawing_area.bind("<motion>", motion) drawing_area.bind("<buttonpress-1>", b1down) drawing_area.bind("<buttonrelease-1>", b1up) Checkbutton To use the checkbutton widget you must a Tkinter variable of the type IntVar (does not have to be IntVar, can be StringVar for example but IntVar is the most commonly used variable type) and bind it 15
16 to the checkbutton. It is with this variable you can check the state of the checkbutton. Easiest way to do this import functools class GUI: def init (self,window): self.var = tk.intvar() checkbutton = tk.checkbutton(window, text="check me", variable=self.var) checkbutton.bind("<buttonrelease-1>",functools.partial(self.cb)) checkbutton.pack() def cb(self,event): if self.var.get() == 1: print "Unchecked" else: print "Checked" g = GUI(window) if name == ' main ': main() To be able to call a member function of the class as a callback we can use the functools module and its partial member function. By using this we can get the object to call its own member function as a callback. The normal callback is expecting just one argument (event) but in our case the function takes two, self and event. This little sample will print Checked in the console when the checkbutton is checked and Unchecked when it is not checked. 16
17 Frame The frame widget is used to group other widgets. It can also be used for decorations like this: tk.label(text="top").pack() separator = tk.frame(height=2, bd=1, relief= tk.sunken) separator.pack(fill=tk.x, padx=5, pady=5) tk.label(text="bottom").pack() if name == ' main ': main() Radiobutton The radio button works almost like the check button but only one can be selected at a time: import functools class GUI: def init (self,window): self.var = tk.intvar() radio1 = tk.radiobutton(window, text="first", variable=self.var,value = 0) radio2 = tk.radiobutton(window, text="second", variable=self.var, value = 1) radio1.bind("<buttonrelease-1>",functools.partial(self.cb)) radio2.bind("<buttonrelease-1>",functools.partial(self.cb)) radio1.pack() radio2.pack() def cb(self,event): print self.var.get() if self.var.get() == 1: print "First" else: print "Second" g = GUI(window) if name == ' main ': main() 17
18 If we, when we create the radio buttons set the option indicatoron to 0 they will become button boxes instead radio1=tk.radiobutton(window,text="first",variable=self.var,value=0,indicatoron=0) radio2=tk.radiobutton(window,text="second",variable=self.var,value=1,indicatoron=0) 18
19 LabelFrame The label frame is used to group items such as radio buttons. To wrap our radio button example in a label frame we can do this: import functools class GUI: def init (self,window): self.var = tk.intvar() group = tk.labelframe(window, text="select", padx=5, pady=5) group.pack(padx=10, pady=10) radio1 = tk.radiobutton(group, text="first", variable=self.var,value = 0) radio2 = tk.radiobutton(group, text="second", variable=self.var, value = 1) radio1.bind("<buttonrelease-1>",functools.partial(self.cb)) radio2.bind("<buttonrelease-1>",functools.partial(self.cb)) radio1.pack(side=tk.left) radio2.pack(side=tk.left) def cb(self,event): print self.var.get() if self.var.get() == 1: print "First" else: print "Second" g = GUI(window) if name == ' main ': main() 19
20 Menus This widget is used to display all kinds of menus used by an application. Since this widget uses native code where possible, you shouldn t try to fake menus using buttons and other Tkinter widgets. Pull-down Menus Top-level and pull-down menus are created the same way so here is a small example of a pull-down menu. All menu choices except Exit call the same function that just will print Hello! in the console. def hello(): print "hello!" menubar = tk.menu(window) # create a pulldown menu, and add it to the menu bar filemenu = tk.menu(menubar, tearoff=0) filemenu.add_command(label="open", command=hello) filemenu.add_command(label="save", command=hello) filemenu.add_separator() filemenu.add_command(label="exit", command=window.quit) menubar.add_cascade(label="file", menu=filemenu) # create more pulldown menus editmenu = tk.menu(menubar, tearoff=0) editmenu.add_command(label="cut", command=hello) editmenu.add_command(label="copy", command=hello) editmenu.add_command(label="paste", command=hello) menubar.add_cascade(label="edit", menu=editmenu) helpmenu = tk.menu(menubar, tearoff=0) helpmenu.add_command(label="about", command=hello) menubar.add_cascade(label="help", menu=helpmenu) # display the menu window.config(menu=menubar) if name == ' main ': main() 20
21 Popup Menus Popup menus is created the same way as normal menus, but is explicitly displayed using the post method. def hello(): print "hello!" # create a popup menu menu = tk.menu(window, tearoff=0) menu.add_command(label="undo", command=hello) menu.add_command(label="redo", command=hello) # create a canvas frame = tk.frame(window, width=512, height=512) frame.pack() # define the callback method def popup(event): menu.post(event.x_window, event.y_window) # attach popup to canvas frame.bind("<button-3>", popup) if name == ' main ': main() 21
22 Message Widget This widget is used to display short text messages using a single font. You can often use a plain Label instead. If you need to display text in multiple fonts, use the Text widget. tmessage = tk.message(window,text="hi there. This is a text message...") tmessage.pack() if name == ' main ': main() Text Widget The text widget is used to display text documents, containing either plain text or formatted text (using different fonts, embedded images, and other embellishments). The text widget can also be used as a text editor. This widget is rather complex and has lots of features. For more information look at this web page: There is also a variant of this widget called ScrolledText that offers all features of the text widget along with a vertical scrollbar. More Widgets There are more widgets you can use in your programs. To learn more about them you can visit or 22
23 Writing GUI in Python 3 As for Python 3 Tkinter has went through some changes. Most of what we saw for Python 2 still applies but as the programs above will not run we will look at some examples here to see the difference. Importing Tkinter in Python 3 This is where we see the first difference. When importing the Tkinter package in Python 3 we will need to do it with the name tkinter all lower case like this import tkinter or as I will do it in this text import tkinter as tk I will use the later version so I will not have to type tkinter each time but just tk. 23
24 Using the Python 2 Examples in Python 3 All of the examples above will work in Python 3 if we use this import with a few exceptions. First you will need to change all print-statements from print something to print(something) Then there is a change when it comes to how to show a message box. In the Events and Binding section above we saw an example where we used a message box to display some information. The messagebox has been moved in the tkinter package structure. The very same program for Python 3 will look like this import tkinter as tk from tkinter import messagebox v = tk.stringvar() def buttoncallback(event): messagebox.showinfo("say hi","hi there " + v.get()) label = tk.label(window,text = "Name: ") label.grid() #row and column defaults to 0 name = tk.entry(window, textvariable=v) name.grid(row=0, column=1) button = tk.button(window, text="submit") button.grid(row=1,column=1,sticky=tk.e) button.bind("<buttonrelease-1>", buttoncallback) Exercisers GUI 1. Write your own Window class that does all the setup in the constructor and then has a function called addwidgets that will add all widgets you will use to the frame. 2. Create a file browser with a GUI. You can solve this in many ways but let the user choose a directory and list all files and sub-directories. Let the user be able to select one of the subdirectories and then you should list all files in this directory. 24
Chapter 9 GUI Programming Using Tkinter. Copyright 2012 by Pearson Education, Inc. All Rights Reserved.
Chapter 9 GUI Programming Using Tkinter 1 Motivations Tkinter is not only a useful tool for developing GUI projects, but also a valuable pedagogical tool for learning object-oriented programming. 2 Objectives
More informationProgramming Training. This Week: Tkinter for GUI Interfaces. Some examples
Programming Training This Week: Tkinter for GUI Interfaces Some examples Tkinter Overview Set of widgets designed by John K. Ousterhout, 1987 Tkinter == Tool Kit Interface Mean to be driven by Tcl (Toolkit
More informationIntroduction to Programming Using Python Lecture 6. Dr. Zhang COSC 1437 Spring, 2018 March 01, 2018
Introduction to Programming Using Python Lecture 6 Dr. Zhang COSC 1437 Spring, 2018 March 01, 2018 Chapter 9 GUI Programming Using Tkinter Getting started with Tkinter with a simple example. Code example:
More informationPython for Scientific Computations and Control
Python for Scientific Computations and Control 1 Python for Scientific Computations and Control Project Report Georg Malte Kauf Python for Scientific Computations and Control 2 Contents 1 Introduction
More informationTkinter Part II: Buttons, Lambda & Dynamic Content
Tkinter Part II: Buttons, Lambda & Dynamic Content July 8, 2015 Brian A. Malloy Slide 1 of 11 1. We further investigate Labels and Buttons and hook Python actions to these widgets. We present lambda functions,
More informationTkinter: Input and Output Bindings. Marquette University
Tkinter: Input and Output Bindings Marquette University Tkinter Variables Tkinter contains a useful mechanism to connect widgets to variables This allows us to have variables change when widgets do and
More informationMid Unit Review. Of the four learning outcomes for this unit, we have covered the first two. 1.1 LO1 2.1 LO2 LO2
Lecture 8 Mid Unit Review Of the four learning outcomes for this unit, we have covered the first two. LO Learning outcome (LO) AC Assessment criteria for pass The learner can: LO1 Understand the principles
More informationENGR/CS 101 CS Session Lecture 15
ENGR/CS 101 CS Session Lecture 15 Log into Windows/ACENET (reboot if in Linux) Use web browser to go to session webpage http://csserver.evansville.edu/~hwang/f14-courses/cs101.html Right-click on lecture15.py
More informationTcl/Tk lecture. What is the Wish Interpreter? CIS 410/510 User Interface Programming
Tcl/Tk lecture CIS 410/510 User Interface Programming Tool Command Language TCL Scripting language for developing & using GUIs Allows generic programming variables, loops, procedures Embeddable into an
More informationLevel 3 Computing Year 2 Lecturer: Phil Smith
Level 3 Computing Year 2 Lecturer: Phil Smith We looked at: Debugging Previously BTEC Level 3 Year 2 Unit 16 Procedural programming Now Now we will look at: GUI applications. BTEC Level 3 Year 2 Unit 16
More informationGetting Started p. 1 Obtaining Tcl/Tk p. 1 Interactive Execution p. 1 Direct Execution p. 4 Reading this Book p. 6 Requirements for Networking
Foreword p. xi Acknowledgments p. xiii Getting Started p. 1 Obtaining Tcl/Tk p. 1 Interactive Execution p. 1 Direct Execution p. 4 Reading this Book p. 6 Requirements for Networking Examples p. 7 Requirements
More informationSliders. If we start this script, we get a window with a vertical and a horizontal slider:
Sliders Introduction A slider is a Tkinter object with which a user can set a value by moving an indicator. Sliders can be vertically or horizontally arranged. A slider is created with the Scale method().
More information# arrange Label in parent widget
Much of today s software uses a point-and-click graphical user interface (GUI). The standard library modules Tkinter and Tix allow for portable, event-driven, GUI development in Python. A Python/Tkinter
More informationSelected GUI elements:
Selected GUI elements: Element tkinter Class Description Frame Frame Holds other GUI elements Label Label Displays uneditable text or icons Button Button Performs an action when the user activates it Text
More informationTxWin 5.xx Programming and User Guide
TxWin 5.xx Programming and User Guide Jan van Wijk Brief programming and user guide for the open-source TxWin text UI library Presentation contents Interfacing, include files, LIBs The message event model
More informationApplication Note: Creating a Python Graphical User Interface. Matthew Roach March 31 st, 2014
Application Note: Creating a Python Graphical User Interface Matthew Roach March 31 st, 2014 Abstract: This document contains 2 portions. First, it provides an introduction into phase and the use of phase
More informationGraphical User Interfaces with Perl/Tk. Event Driven Programming. Structure of an Event-Driven Program. An introduction
Graphical User Interfaces with Perl/Tk An introduction Event Driven Programming In functional programming, what happens when is determined (almost) entirely by the programmer. The user generally has a
More informationTable Basics. The structure of an table
TABLE -FRAMESET Table Basics A table is a grid of rows and columns that intersect to form cells. Two different types of cells exist: Table cell that contains data, is created with the A cell that
More informationLecture 3 - Overview. More about functions Operators Very briefly about naming conventions Graphical user interfaces (GUIs)
Lecture 3 - Overview More about functions Operators Very briefly about naming conventions Graphical user interfaces (GUIs) Function parameters Passed by reference, but the standard implication that the
More informationPart 3. Useful Python
Part 3 Useful Python Parts one and two gave you a good foundation in the Python language and a good understanding of software design. You ve built some substantial applications, and hopefully you ve built
More informationSolo 4.6 Release Notes
June9, 2017 (Updated to include Solo 4.6.4 changes) Solo 4.6 Release Notes This release contains a number of new features, as well as enhancements to the user interface and overall performance. Together
More informationForms Desktop for Windows Version 4 Manual
Forms Desktop for Windows Version 4 Manual Revision Date 12/05/2007 HanDBase is a Registered Trademark of DDH Software, Inc. All information contained in this manual and all software applications mentioned
More informationGUI Components: Part 1
1 2 11 GUI Components: Part 1 Do you think I can listen all day to such stuff? Lewis Carroll Even a minor event in the life of a child is an event of that child s world and thus a world event. Gaston Bachelard
More informationWhen to use the Grid Manager
第 1 页共 5 页 2015/6/8 8:02 back next The Grid geometry manager puts the widgets in a 2-dimensional table. The master widget is split into a number of rows and columns, and each cell in the resulting table
More informationGraphical User Interface (GUI)
Graphical User Interface (GUI) An example of Inheritance and Sub-Typing 1 Java GUI Portability Problem Java loves the idea that your code produces the same results on any machine The underlying hardware
More informationHow to Create Greeting Cards using LibreOffice Draw
by Len Nasman, Bristol Village Ohio Computer Club If you want to create your own greeting cards, but you do not want to spend a lot of money on special software, you are in luck. It turns out that with
More informationPTN-202: Advanced Python Programming Course Description. Course Outline
PTN-202: Advanced Python Programming Course Description This 4-day course picks up where Python I leaves off, covering some topics in more detail, and adding many new ones, with a focus on enterprise development.
More informationIntroduction to IBM Rational HATS For IBM System i (5250)
Introduction to IBM Rational HATS For IBM System i (5250) Introduction to IBM Rational HATS 1 Lab instructions This lab teaches you how to use IBM Rational HATS to create a Web application capable of transforming
More informationCS 2316 Exam 2 Summer 2011
CS 2316 Exam 2 Summer 2011 Name : Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam
More informationCS 112: Intro to Comp Prog
CS 112: Intro to Comp Prog Tkinter Layout Managers: place, pack, grid Custom Frames Widgets In-depth StringVar tkfont Upcoming Tk To use Tkinter Widgets (components: buttons, labels, etc). You must import
More informationIntroduction to MS Word XP 2002: An Overview
Introduction to MS Word XP 2002: An Overview Sources Used: http://www.fgcu.edu/support/office2000/word/files.html Florida Gulf Coast University Technology Skills Orientation Word 2000 Tutorial The Computer
More informationCAS London CPD Day February 16
Practical Sheet: GUI Programming This sheet is a set of exercises for introducing GUI programming in Python using Tkinter, assuming knowledge of basic Python programming. All materials are at http://www.eecs.qmul.ac.uk/~william/cas-london-2016.html
More informationWorking with PDF s. To open a recent file on the Start screen, double click on the file name.
Working with PDF s Acrobat DC Start Screen (Home Tab) When Acrobat opens, the Acrobat Start screen (Home Tab) populates displaying a list of recently opened files. The search feature on the top of the
More informationRich Text Editor Quick Reference
Rich Text Editor Quick Reference Introduction Using the rich text editor is similar to using a word processing application such as Microsoft Word. After data is typed into the editing area it can be formatted
More informationOU EDUCATE TRAINING MANUAL
OU EDUCATE TRAINING MANUAL OmniUpdate Web Content Management System El Camino College Staff Development 310-660-3868 Course Topics: Section 1: OU Educate Overview and Login Section 2: The OmniUpdate Interface
More informationProgram and Graphical User Interface Design
CHAPTER 2 Program and Graphical User Interface Design OBJECTIVES You will have mastered the material in this chapter when you can: Open and close Visual Studio 2010 Create a Visual Basic 2010 Windows Application
More informationText box. Command button. 1. Click the tool for the control you choose to draw in this case, the text box.
Visual Basic Concepts Hello, Visual Basic See Also There are three main steps to creating an application in Visual Basic: 1. Create the interface. 2. Set properties. 3. Write code. To see how this is done,
More informationOutline. general information policies for the final exam
Outline 1 final exam on Tuesday 5 May 2015, at 8AM, in BSB 337 general information policies for the final exam 2 some example questions strings, lists, dictionaries scope of variables in functions working
More informationCreating Buttons and Pop-up Menus
Using Fireworks CHAPTER 12 Creating Buttons and Pop-up Menus 12 In Macromedia Fireworks 8 you can create a variety of JavaScript buttons and CSS or JavaScript pop-up menus, even if you know nothing about
More informationThis homework has an opportunity for substantial extra credit, which is described at the end of this document.
CS 2316 Pair Homework Box Packer Due: Tuesday, June 17th, before 11:55 PM Out of 100 points Files to submit: 1. boxpacker.py For Help: - TA Helpdesk Schedule posted on class website. - Email TA's or use
More informationSelf-Teach Exercises: Getting Started Turtle Python
Self-Teach Exercises: Getting Started Turtle Python 0.1 Select Simple drawing with pauses Click on the Help menu, point to Examples 1 drawing, counting, and procedures, and select the first program on
More informationIntroducing Motif. Motif User s Guide 1
Introducing Motif Motif is a software system that provides you with a great deal of control over the appearance of your computer s visual display. This introductory chapter provides information on the
More informationWord Creating & Using Tables. IT Training & Development (818) Information Technology
Information Technology Word 2007 User Guide Word 2007 Creating & Using Tables IT Training & Development (818) 677-1700 training@csun.edu www.csun.edu/it/training Table of Contents Introduction... 1 Anatomy
More informationIn the first class, you'll learn how to create a simple single-view app, following a 3-step process:
Class 1 In the first class, you'll learn how to create a simple single-view app, following a 3-step process: 1. Design the app's user interface (UI) in Xcode's storyboard. 2. Open the assistant editor,
More informationinside: THE MAGAZINE OF USENIX & SAGE June 2002 volume 27 number 3 PROGRAMMING THE TCLISH SPOT by Clif Flynt
THE MAGAZINE OF USENIX & SAGE June 2002 volume 27 number 3 inside: PROGRAMMING THE TCLISH SPOT by Clif Flynt & The Advanced Computing Systems Association & The System Administrators Guild the tclsh spot
More informationTKproE 2.20 Documentation
2.20 Documentation Table of Contents TKproE 2.20 Documentation About TKproE...5 TKproE License...5 Other license information...6 Introduction...7 Learn more about TCL/TK at:...7 Installation...8 Command
More informationOCTAVO An Object Oriented GUI Framework
OCTAVO An Object Oriented GUI Framework Federico de Ceballos Universidad de Cantabria federico.ceballos@unican.es November, 2004 Abstract This paper presents a framework for building Window applications
More informationMCS 2 USB Software for OSX
for OSX JLCooper makes no warranties, express or implied, regarding this software s fitness for a particular purpose, and in no event shall JLCooper Electronics be liable for incidental or consequential
More informationSPARK. User Manual Ver ITLAQ Technologies
SPARK Forms Builder for Office 365 User Manual Ver. 3.5.50.102 0 ITLAQ Technologies www.itlaq.com Table of Contents 1 The Form Designer Workspace... 3 1.1 Form Toolbox... 3 1.1.1 Hiding/ Unhiding/ Minimizing
More informationTeaching London Computing
Teaching London Computing A Level Computer Science Programming GUI in Python William Marsh School of Electronic Engineering and Computer Science Queen Mary University of London How the Session Works Outline
More informationSciGraphica. Tutorial Manual - Tutorials 1and 2 Version 0.8.0
SciGraphica Tutorial Manual - Tutorials 1and 2 Version 0.8.0 Copyright (c) 2001 the SciGraphica documentation group Permission is granted to copy, distribute and/or modify this document under the terms
More informationCS 5 Post-Herald-Penguin- Times-Mercury
CS 5 Post-Herald-Penguin- Times-Mercury Penguin Jailed in Hacking Case Claremont (Muddraker): Residents of East Dorm were rudely awakened Monday morning when a police battering ram suddenly knocked a hole
More informationWORD XP/2002 USER GUIDE. Task- Formatting a Document in Word 2002
University of Arizona Information Commons Training Page 1 of 21 WORD XP/2002 USER GUIDE Task- Formatting a Document in Word 2002 OBJECTIVES: At the end of this course students will have a basic understanding
More informationDOING MORE WITH EXCEL: MICROSOFT OFFICE 2013
DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Basic Formulas Filling Data
More information4 Tutorial: TTCN Suite
4 Tutorial: TTCN Suite Basics (in Windows) This tutorial is intended as an easy introduction to the TTCN suite for the newcomer. It is assumed that you have some basic knowledge about Windows. In addition,
More informationWorking with Mailbox Manager
Working with Mailbox Manager A user guide for Mailbox Manager supporting the Message Storage Server component of the Avaya S3400 Message Server Mailbox Manager Version 5.0 February 2003 Copyright 2003
More informationGraphical User Interface (GUI)
Graphical User Interface (GUI) An example of Inheritance and Sub-Typing 1 Java GUI Portability Problem Java loves the idea that your code produces the same results on any machine The underlying hardware
More informationForms for Palm OS Version 4 Manual
Forms for Palm OS Version 4 Manual Revision Date 12/05/2007 HanDBase is a Registered Trademark of DDH Software, Inc. All information contained in this manual and all software applications mentioned in
More informationTcl/Tk for XSPECT a Michael Flynn
Tcl/Tk for XSPECT a Michael Flynn Tcl: Tcl (i.e. Tool Command Language) is an open source scripting language similar to other modern script languages such as Perl or Python. It is substantially more powerful
More informationOffice 365: . Accessing and Logging In. Mail
Office 365: Email This class will introduce you to Office 365 and cover the email components found in Outlook on the Web. For more information about the Microsoft Outlook desktop client, register for a
More informationCS 2316 Homework 9b GT Thrift Shop Due: Wednesday, April 20 th, before 11:55 PM Out of 100 points. Premise
CS 2316 Homework 9b GT Thrift Shop Due: Wednesday, April 20 th, before 11:55 PM Out of 100 points Files to submit: 1. HW9b.py 2. any image files (.gif ) used in database This is an INDIVIDUAL assignment!
More informationTable of Contents COURSE OVERVIEW... 3 LESSON 1: OUTLOOK 2010 CALENDAR INTERFACE... 5
Table of Contents COURSE OVERVIEW... 3 LESSON 1: OUTLOOK 2010 CALENDAR INTERFACE... 5 OPEN OUTLOOK CALENDAR... 5 Ribbon... 6 Navigation Pane... 6 Appointment Area... 6 Task Pane... 6 To-Do Bar... 6 THE
More informationGraphical User Interface Canvas Frame Event structure Platform-free GUI operations Operator << Operator >> Operator = Operator ~ Operator + Operator
Graphical User Interface Canvas Frame Event structure Platform-free GUI operations Operator > Operator = Operator ~ Operator + Operator - Operator [] Operator size Operator $ Operator? Operator!
More informationMicrosoft Word 2007 on Windows
1 Microsoft Word 2007 on Windows Word is a very popular text formatting and editing program. It is the standard for writing papers and other documents. This tutorial and quick start guide will help you
More informationMicrosoft Word: Steps To Success (The Bare Essentials)
Microsoft Word: Steps To Success (The Bare Essentials) Workbook by Joyce Kirst 2005 Microsoft Word: Step to Success (The Bare Essentials) Page Contents 1 Starting Word 2 Save 3 Exit 5 Toolbars, Alignment,
More information= 3 + (5*4) + (1/2)*(4/2)^2.
Physics 100 Lab 1: Use of a Spreadsheet to Analyze Data by Kenneth Hahn and Michael Goggin In this lab you will learn how to enter data into a spreadsheet and to manipulate the data in meaningful ways.
More informationProvideX. NOMADS Enhancements
ProvideX VERSION 8.0 NOMADS Enhancements Introduction 3 Panel Designer Enhancements 5 Properties Window 7 New Format Definition for Grids/List Boxes 12 Bulk Edit Utility 14 Drag and Drop Utility 16 Dependency
More informationSharePoint List Booster Features
SharePoint List Booster Features Contents Overview... 5 Supported Environment... 5 User Interface... 5 Disabling List Booster, Hiding List Booster Menu and Disabling Cross Page Queries for specific List
More informationSri Vidya College of Engineering & Technology
UNIT-V TWO MARKS QUESTION & ANSWER 1. What is the difference between the Font and FontMetrics class? Font class is used to set or retrieve the screen fonts.the Font class maps the characters of the language
More informationMicrosoft Word 2003 for Windows, Part 2
Microsoft Word 2003 for Windows, Part 2 In this workshop, the following Word 2003 features will be covered: Creating and using Tables Formatting text using Styles Using MailMerge Arranging text in Columns
More informationUsing the Zoo Workstations
Using the Zoo Workstations Version 1.86: January 16, 2014 If you ve used Linux before, you can probably skip many of these instructions, but skim just in case. Please direct corrections and suggestions
More informationUse the Move tool to drag A around and see how the automatically constructed objects (like G or the perpendicular and parallel lines) are updated.
Math 5335 Fall 2015 Lab #0: Installing and using GeoGebra This semester you will have a number of lab assignments which require you to use GeoGebra, a dynamic geometry program. GeoGebra lets you explore
More informationCS 2316 Exam 3 Fall 2011
CS 2316 Exam 3 Fall 2011 Name : 1. (2 points) Grading TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking
More informationPART 7. Getting Started with Excel
PART 7 Getting ed with Excel When you start the application, Excel displays a blank workbook. A workbook is a file in which you store your data, similar to a three-ring binder. Within a workbook are worksheets,
More informationWidget. Widget is a generic name for parts of an interface that have their own behaviour. e.g., buttons, progress bars, sliders, drop-down
Widgets Jeff Avery Widget Widget is a generic name for parts of an interface that have their own behaviour. e.g., buttons, progress bars, sliders, drop-down menus, spinners, file dialog boxes, etc are
More informationCIS192 Python Programming
CIS192 Python Programming Graphical User Interfaces Robert Rand University of Pennsylvania November 19, 2015 Robert Rand (University of Pennsylvania) CIS 192 November 19, 2015 1 / 20 Outline 1 Graphical
More informationIntroduction to Microsoft Word 2010
Introduction to Microsoft Word 2010 Microsoft Word is a word processing program you can use to write letters, resumes, reports, and more. Anything you can create with a typewriter, you can create with
More informationEXCEL + POWERPOINT. Analyzing, Visualizing, and Presenting Data-Rich Insights to Any Audience KNACK TRAINING
EXCEL + POWERPOINT Analyzing, Visualizing, and Presenting Data-Rich Insights to Any Audience KNACK TRAINING KEYBOARD SHORTCUTS NAVIGATION & SELECTION SHORTCUTS 3 EDITING SHORTCUTS 3 SUMMARIES PIVOT TABLES
More informationFM 4/100 USB Software for OSX
FM 4/100 USB Software for OSX JLCooper makes no warranties, express or implied, regarding this software s fitness for a particular purpose, and in no event shall JLCooper Electronics be liable for incidental
More informationCaja File Manager. Desktop User Guide
Caja File Manager Desktop User Guide Desktop User Guide» Working with Files This chapter describes how to use the Caja file manager. Introduction Spatial Mode Browser Mode Opening Files Searching For Files
More informationSchoolDesk University
SchoolDesk University Forms, Surveys, and Polls Module 101 Guided Walk-through for the basic fields, terminology, and location of tools. What is the NEW SD7 Forms Module? The NEW SchoolDesk Forms Module,
More informationDOING MORE WITH EXCEL: MICROSOFT OFFICE 2010
DOING MORE WITH EXCEL: MICROSOFT OFFICE 2010 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Filling Data Across Columns
More informationCSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup
CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup Purpose: The purpose of this lab is to setup software that you will be using throughout the term for learning about Python
More informationUsing Microsoft Word. Text Editing
Using Microsoft Word A word processor is all about working with large amounts of text, so learning the basics of text editing is essential to being able to make the most of the program. The first thing
More informationPython Scripting for Computational Science
Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures 43 Springer Table of Contents 1 Introduction... 1 1.1 Scripting versus Traditional Programming... 1 1.1.1
More informationConfiguring Ad hoc Reporting. Version: 16.0
Configuring Ad hoc Reporting Version: 16.0 Copyright 2018 Intellicus Technologies This document and its content is copyrighted material of Intellicus Technologies. The content may not be copied or derived
More informationExcel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller
Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing
More informationPBwiki Basics Website:
Website: http://etc.usf.edu/te/ A wiki is a website that allows visitors to edit or add their own content to the pages on the site. The word wiki is Hawaiian for fast and this refers to how easy it is
More informationNumbers Basics Website:
Website: http://etc.usf.edu/te/ Numbers is Apple's new spreadsheet application. It is installed as part of the iwork suite, which also includes the word processing program Pages and the presentation program
More informationName: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 5/17/2012 Physics 120 Section: ####
Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 Lab partners: Lab#1 Presentation of lab reports The first thing we do is to create page headers. In Word 2007 do the following:
More informationCS 112 Project Assignment: Visual Password
CS 112 Project Assignment: Visual Password Instructor: Dan Fleck Overview In this project you will use Python to implement a visual password system. In the industry today there is ongoing research about
More informationBasic Steps for Creating an Application with the ArcGIS Server API for JavaScript
Chapter 4: Working with Maps and Layers Now that you have a taste of ArcGIS Server and the API for JavaScript it s time to actually get to work and learn how to build some great GIS web applications! The
More informationCS 2316 Exam 3 Fall 2012
CS 2316 Exam 3 Fall 2012 Name : Section TA: Integrity: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in
More informationExercises Lecture 3 Layouts and widgets
Exercises Lecture 3 Layouts and widgets Aim: Duration: This exercise will help you explore and understand Qt's widgets and the layout approach to designing user interfaces. 2h The enclosed Qt Materials
More informationAdding Information to a Worksheet
Figure 1-1 Excel s welcome page lets you create a new, blank worksheet or a readymade workbook from a template. For now, click the Blank workbook picture to create a new spreadsheet with no formatting
More informationExcel Select a template category in the Office.com Templates section. 5. Click the Download button.
Microsoft QUICK Excel 2010 Source Getting Started The Excel Window u v w z Creating a New Blank Workbook 2. Select New in the left pane. 3. Select the Blank workbook template in the Available Templates
More informationEasy Graphical User Interfaces
Easy Graphical User Interfaces with breezypythongui Types of User Interfaces GUI (graphical user interface) TUI (terminal-based user interface) UI Inputs Outputs Computation Terminal-Based User Interface
More informationSTUDENT WORKBOOK. Teach Yourself: Computer Basics Expert. In 24 Hours or less
STUDENT WORKBOOK Teach Yourself: Computer Basics Expert In 24 Hours or less Student Workbook Table of Contents Section 1: Understanding Applications... 1 Lesson 1.1: Application Basics... 2 Step-By-Step...
More informationCreo UI Editor C++ User s Guide
Creo UI Editor C++ User s Guide 5.0.0.0 Copyright 2018 PTC Inc. and/or Its Subsidiary Companies. All Rights Reserved. User and training guides and related documentation from PTC Inc. and its subsidiary
More informationAsynchronous Programming
Asynchronous Programming Turn-in Instructions A main file, called gui.py See previous slides for how to make it main I ll run it from the command line Put in a ZIP file, along with any additional needed
More information