Tk. Toolkit n Wish - windowing shell –touch fileName –chmod +x fileName –xedit fileName & –#!/usr/local/bin/wish n Widgets - eg Buttons, Labels, Frames.

Slides:



Advertisements
Similar presentations
Topics in Python Blackjack & TKinter
Advertisements

Tk Widgets This material is best on several sources –Slides by Dr. Ernest J. Friedman-Hill –various Tcl/Tk books.
Noadswood Science,  To know how to use Python to produce windows and colours along with specified co-ordinates Sunday, April 12, 2015.
1 Lecture 10: Toolkits: Intrinsics, Callbacks, Resources, Widget hierarchies, Geometry management Brad Myers Advanced User Interface Software.
Tcl/Tk 1 CS 414, Software Engineering I Mark Ardis Rose-Hulman Institute December 3, 2002.
Building User Interfaces with Tk/Tcl Outline –Basic Structures –Widget Creation –Geometry Management –Widget Commands –Event Bindings –Interprocess Communication.
Tcl and Tk CSE 470 Fall 1999 Revised by Prasad. Objective To use Tcl Tk to develop GUI and prototype of the project.
Android Apps: Building Blocks Module 6, Intro to I.T., Fall 2011 Sam Scott.
Beginning Programming with the Visual Studio.NET Environment.
Graphical User Interfaces with Perl/Tk An introduction.
Hello World In C++ and Microsoft Visual C++. Directions to begin a project 1. Go to All Programs 2. Open Visual Studio C++ 3. Click on New Project 4.
COMPSCI 101 Principles of Programming
18. Python - GUI Programming (Tkinter)
Chapter 12: Using Controls. Examining the IDE’s Automatically Generated Code A new Windows Forms project has been started and given the name FormWithALabelAndAButton.
Tcl/Tk package in R Yichen Qin
The University of Texas – Pan American
Guide to Programming with Python Chapter Ten GUI Development: The Mad Lib Program.
Tcl/Tk: An introduction D. Kim, K. Kundu, and M. Siegel November 26, 2002 CMSC 631.
App Inventor MIT App Inventor.
GUI development with Matlab: GUI Front Panel Components 1 GUI front panel components In this section, we will look at -GUI front panel components -Programming.
Advanced BioPSE NCRR SCIRun GUI Guidelines J. Davison de St. Germain Chief Software Engineer SCI Institute December 2003 J. Davison de St.
Institute of Informatics & Telecommunications – NCSR “Demokritos” TileQt and TileGtk: current status Georgios Petasis Software and Knowledge Engineering.
Lecture 5(b), Slide 1 CP2030 Copyright © University of Wolverhampton CP2030 Visual Basic for C++ Programmers v Component 5(b) HCI aspects of VB programming.
Advanced EPICS Training, Dirk Zimoch 2008 Channel Access in Tcl/Tk.
 2002 Prentice Hall. All rights reserved. 1 Chapter 10 – Graphical User Interface Components: Part 1 Outline 10.1 Introduction 10.2 Tkinter Overview 10.3.
CSCI/CMPE 4341 Topic: Programming in Python Review: Exam II Xiang Lian The University of Texas – Pan American Edinburg, TX 78539
PC204 Lecture 9 Conrad Huang Genentech Hall, N453A x
Interaction Models II Marti Hearst (UCB SIMS) SIMS 213, UI Design & Development March 11, 1999.
PYTHON GUI PROGRAMMING
Working with Objects. Objectives Create an object Transform an object Arrange and lock an object Step and repeat an object Use Live Distribute Use the.
Building User Interfaces With Tcl And Tk John Ousterhout Sun Microsystems Laboratories Tcl/Tk Tutorial, Part III.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Lecture 10: Toolkits: Intrinsics, Callbacks, Resources, Widget hierarchies, Geometry management Brad Myers Advanced User Interface Software 1© 2013.
PERL TK. 4.Use an IDE 3. Use the documentation! 2. Experiment. 1.Learn the basics.
How to MODIFY a BUTTON and Modify Button Modify Button in the Title Bar Record button Modify button Battery gauge Memory gauge Day, date, and time Setup.
© Copyright 2012 by Pearson Education, Inc. All Rights Reserved. Chapter 9 GUI Programming Using Tkinter 1.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
SEEM3460 Tutorial GUI in Java. Some Basic GUI Terms Component (Control in some languages) the basic GUI unit something visible something that user can.
Objects and Classes Procedural Programming A series of functions performing specific tasks Data items are passed from one function to another by arguments.
Programming into Slicer3. Sonia Pujol, Ph.D., Harvard Medical School National Alliance for Medical Image Computing ©
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.
Porting a large scale enterprise application from Tcl/Tk 8.4 to 8.5 Prashant Thakre, Tushar Gupta {prashant_thakre, Gaurav Bansal.
Graphics Programming with Python. Many choices Python offers us several library choices:  Tkinter  WxPython  PyQt  PyGTK  Jython  And others...
Creating visual interfaces in python
The Python interpreter CSE 160 University of Washington Ruth Anderson 1.
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective.
Guide to Programming with Python
COMPSA Exam Prep Session by Paul Allison On: April 8th from 1:30-3:00 Location TBA Winter 2016CISC101 - Prof. McLeod1.
See Winter 2016CISC101 - Prof. McLeod1.
CS2021- Week 7 Tkinter Tour. Core tkinter concepts Widget Classes: Label Button Frame Toplevel, Tk Message, Entry, Checkbutton, Radiobutton Menubutton,
Programming Using Tcl/Tk Week 3 Seree Chinodom
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)
Chapter 21 – Graphics/Tk Outline 21.1 Introduction 21.2 GD Module: Creating Simple Shapes 21.3 GD Module: Image Manipulation 21.4 Chart Module 21.5 Introduction.
Ioi Lam Expert Interface Technologies
CISC101 Reminders Grading of Quiz 4 underway.
GUI Using Python.
Fundamentals of Python: From First Programs Through Data Structures
Tkinter Python User Interface
TCL/TK Tool Command Language/Tool Kit.
This Week: Tkinter for GUI Interfaces Some examples
TKinter CS-360 Dick Steflik.
NexTk/NtkWidget A replacement for Tk ?! 1.
Topics Graphical User Interfaces Using the tkinter Module
Visual C# - GUI and controls - 1
Python – Tkinter Windows Application
Tkinter User Input Form
Presentation transcript:

Tk

Toolkit n Wish - windowing shell –touch fileName –chmod +x fileName –xedit fileName & –#!/usr/local/bin/wish n Widgets - eg Buttons, Labels, Frames n Geometry - Placer and Packer n Bindings - Events n Wumpus Interface

Widgets n Example of widgets : –Frame –Label –Button –Checkbutton –Radiobutton –Menubutton –Menu –Entry –Text –Canvas –Scrollbar –Scale –Listbox –Toplevel

Creating widgets Example a button : button.button -text “Hello world” -foreground red -command { destroy. } pack.button -padx 1.0c -pady 1.0c

Bindings n Attached to an Event –ButtonPress –ButtonRelease –Enter –KeyPress –KeyRelease –Motion –Leave bind.button {.button configure - activeforeground green } bind.button {.button configure - background blue }

Geometry n Geometry managers control widget placements n Widgets appear only when told to by the geometry manager n Algorithm for arranging positions n Placer –Simple –Allows programmer to say exactly where objects appear n Packer –Side –Padding –Filling –Expansion

The Wumpus World.frame4.label.frame4.agenttype.frame5.label.frame5.seed.frame.set.frame2.frame.step.frame3.frame.run.a.frame.quit.frame.pic canvas.a.frame2.label.frame2.value.frame3.label.frame3.execute