PERL TK. 4.Use an IDE 3. Use the documentation! 2. Experiment. 1.Learn the basics.

Slides:



Advertisements
Similar presentations
Chapter 3 – Web Design Tables & Page Layout
Advertisements

Chapter 9 Working with Tabs and Tables. Chapter Objectives Work with tabs Create and format a table Format text in a table Place graphics in a table.
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.
By Ed MacKeen Students will Learn: Objectives: To type a document in Microsoft Word and to save it. Use the Center button to center text. Use the Bold.
By Janet Holland & Barbara Higgins-Dover Adobe Photoshop Blended Image Tutorial.
Web Page Development Identify elements of a Web Page Start Notepad
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Word Web Feature Creating Web Pages Using Word.

Using HTML to Create Tables in Web pages Connie Lindsey November 2005.
Chapter 5 Working with Tables. Agenda Add a Table Assign a Table Border Adjust Cell Padding and Spacing Adjust Cell Width and Height Add Column Labels.
CHAPTER 11 Tables. How Are Tables Used Data Display  Very tidy and very useful Better Text Alignment  Putting text in tables allows you to format indents.
Web Design HTML, Frontpage, DreamWeaver μέρος β ΠΡΥ019 - Πληροφορική Δρ.Βάσος Βασιλείου.
Dreamweaver CS4 Concepts and Techniques Chapter 5 Templates and Style Sheets.
Graphical User Interfaces with Perl/Tk An introduction.
Dreamweaver CS4 Concepts and Techniques Chapter 7 Page Layout with Frames.
18. Python - GUI Programming (Tkinter)
Using Netscape to Design Basic, Yet Beautiful Web Pages! With Designs by Dan EIL 301, spring 2000.
The University of Texas – Pan American
Project 2 Adding Web Pages, Links, and Images Dreamweaver MX 2004 Concepts and Techniques.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
Advanced BioPSE NCRR SCIRun GUI Guidelines J. Davison de St. Germain Chief Software Engineer SCI Institute December 2003 J. Davison de St.
Word 2010 Vocabulary List 1. Click and Type - A feature that allows you to double-click a blank area of a document to position the cursor in that location,
Dreamweaver CS4 Concepts and Techniques Chapter 2 Adding Web Pages, Links, and Images.
Creating Buttons – Lesson 71 Creating Buttons Lesson 7.
Getting to Know InDesign
Templates and Style Sheets
1 What to do before class starts??? Download the sample database from the k: drive to the u: drive or to your flash drive. The database is named “FormBelmont.accdb”
Chapter 2 – Introduction to the Visual Studio .NET IDE
SEEM3460 Tutorial GUI in Java. Some Basic GUI Terms Component (Control in some languages) the basic GUI unit something visible something that user can.
Adobe Photoshop Blended Image Tutorial Adobe Photoshop Tools Toolbar Tools Palette Windows Menu.
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.
Class 2 Remote Instruction Review of Working with Buttons EDU 556 Programming for Instruction Dr. Steve Broskoske This is an audio PowerCast. Make sure.
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.
9-Nov-97Tri-Ada '971 TASH An Alternative to the Windows API TRI-Ada ‘97 Terry J. Westley
Graphics Programming with Python. Many choices Python offers us several library choices:  Tkinter  WxPython  PyQt  PyGTK  Jython  And others...
CSE 409 – Advanced Internet Technology 1 DISCUSSION OF BASIC HTML TAGS.
Working with Shapes Guided Lesson. Objective  In this lesson you will learn how to insert a shape and format it by changing its fill color, outline color,
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective.
HTML CS 105. Page Structure HTML elements control the details of how a page gets displayed. Every HTML document has the following basic structure: … …
Unit 14 - Desktop Publishing Part 2 Desktop Publishing InDesign – Inside Pages
Links and Images. Links HTML uses a hyperlink to link to another document on the Web A hyperlink can be either text or a picture Links are created with.
The Word Window Fill out your Word Window Worksheet as you view this PowerPoint.
PhotoShop Creative Suite 3 Chapter 1 The Work Area.
Chapter 5 pp HTML Elements & Attributes Format Content Or Examples This Text Is A Hyperlink.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 2 The Visual Basic.NET Integrated Development Environment.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
COMPSA Exam Prep Session by Paul Allison On: April 8th from 1:30-3:00 Location TBA Winter 2016CISC101 - Prof. McLeod1.
HTML Help book. HTML HTML is the programming language used to make web pages for the Internet. HTML stands for Hyper Text Markup Language. HTML is made.
VISIO Getting Started Libby Baker - MS Office Limited Flow Chart Diagram.
Innovation Intelligence ® Feb Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. GUI design Controls Toplevel.
Create a blog Skills: create, modify and post to a blog
Topic one text Topic two text Topic three text Topic four text
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.
Building a User Interface with Forms
My Final Project: Calorie Counter
GUI Using Python.
This Week: Tkinter for GUI Interfaces Some examples
Topic one text Topic two text Topic three text Topic four text
Tkinter Widgets CS 260 Dick Steflik.
Монголын ноосон бүтээгдэхүүн үйлдвэрлэгчдийн холбоо
Faded picture background with full-color overlay (Intermediate)
Whatcha doin'? Aims: Begin to create GUI applications. Objectives:
Topics Graphical User Interfaces Using the tkinter Module
Python – Tkinter Windows Application
Presentation transcript:

PERL TK

4.Use an IDE 3. Use the documentation! 2. Experiment. 1.Learn the basics

#Simple Window use Tk; $mw=MainWindow->new(); MainLoop ;

#Widget Tour use Tk; $mw=MainWindow->new(); $l=$mw->Label(-text => "this is a label"); $l->pack(); $b=$mw->Button(-text => "this is a button"); $b->pack(); $t=$mw->Text(-width => 10,height => 10); $t->insert(end,"this is a text"); $t->pack(); $e=$mw->Entry(width => 0); $e->insert(end,"this is an entry"); $e->pack(); $i=$mw->Listbox(height => 2); $i->insert(end,"listbox element1"); $i->insert(end,"listbox element2"); $i->selectionSet(1); $i->pack(); $be = $mw->BrowseEntry(-label => "Label", -variable => \$var); $be->insert("end", "opt1"); $be->insert("end", "opt2"); $be->insert("end", "opt3"); $be->pack(); MainLoop;

#BUTTONS use Tk; $mw=MainWindow->new( -name => "Buttons", -title => 'Button Demonstration', ); $l=$mw->Label(-text => "If you click on any of the four buttons below, the background of the button area will change to the color indicated in the button. You can press Tab to move among the buttons, then press Space to invoke the current button.", -wraplength => "4i", -justify => left); $l->pack(); foreach my $color (qw/PeachPuff1 LightBlue1 SeaGreen2 Yellow1/) { my $b = $mw->Button( -text => $color, -width => 10, -command => sub{$mw->configure(-background => lc($color))}, ); $b->pack(qw/-side top -expand yes -pady 2/); } MainLoop;

#LABELS use Tk; $mw=MainWindow->new( -name => "Label", -title => 'Label', ); $l=$mw->Label(- text => "Five labels are displayed below: three textual ones on the left, and an image label and a text label on the right. Labels are pretty boring because you can\'t do anything with them.", -wraplength => "4i", -justify => left); $l->pack(); = qw/-side left -expand yes -padx 10 -pady 10 -fill both/; my $left = $mw->Frame->pack(-side => left, -expand => yes, -padx => 10, -pady => 10, -fill => both); my $right = qw/-side top -expand yes -pady 2 -anchor w/; my $left_l1 = $left->Label(-text => 'First my $left_l2 = $left->Label( -text => 'Second label, raised just for fun', -relief => 'raised', )- my $left_l3 = $left->Label( -text => 'Third label, sunken', -relief => = qw/-side top/; my $right_bitmap = $right->Label( -image => $mw->Photo(-file => Tk- >findINC('Xcamel.gif')), -borderwidth => 2, -relief => 'sunken', my $right_caption = $right->Label(-text => MainLoop;

#RADIOBUTTON use Tk; sub click{ $mw->Dialog(-title => "Title", -buttons => ["OK"],text => $_[0])->Show(); } $mw=MainWindow->new( -name => "Radio", -title => 'Radio', ); $v=2; $b=$mw->Radiobutton(-command =>[ \&click,["The Radio 1 clicked “,\$v)],-variable => \$v,-value => 1); $b1=$mw->Radiobutton(-command =>[ \&click("The Radio 2 clicked",\$v1)],-variable => \$v,-value => 2); $b->pack(); $b1->pack(); MainLoop;

#Try to pack the "Button 10" at the left use Tk; $mw=MainWindow->new(); $mw->Button(-text => "Button1")->pack(qw/-side top -pady 2/); $mw->Button(-text => "Button2")->pack(qw/-side top -pady 2/); $mw->Button(-text => "Button3")->pack(qw/-side top -pady 2/); $mw->Button(-text => "Button4")->pack(qw/-side top -pady 2/); $mw->Button(-text => "Button 10")->pack(qw/-side left -expand yes - pady 2/); MainLoop;

use Tk; $mw=MainWindow->new(); $mw->Button(-text => "Button 10")->pack(qw/-side left -pady 2/); $mw->Button(-text => "Button1")->pack(qw/-side top - pady 2/); $mw->Button(-text => "Button2")->pack(qw/-side top - pady 2/); $mw->Button(-text => "Button3")->pack(qw/-side top - pady 2/); $mw->Button(-text => "Button4")->pack(qw/-side top -pady 2/); MainLoop;

#Make it to take all the extra space use Tk; $mw=MainWindow->new(); $mw->Button(-text => "Button 10", -height => 8 )->pack(qw/-side left -expand yes -pady 2/); $mw->Button(-text => "Button1")->pack(qw/- side top -expand yes -pady 2/); $mw->Button(-text => "Button2")->pack(qw/- side top -expand yes -pady 2/); $mw->Button(-text => "Button3")->pack(qw/- side top -expand yes -pady 2/); $mw->Button(-text => "Button4")->pack(qw/- side top -expand yes -pady 2/); MainLoop;

use Tk; $mw=MainWindow->new(); $mw->Button(-text => "Button 10", -height => 8 )- >pack(qw/-side left -expand yes -pady 2 fill y/); $mw->Button(-text => "Button1")->pack(qw/-side top -expand yes -pady 2/); $mw->Button(-text => "Button2")->pack(qw/-side top -expand yes -pady 2/); $mw->Button(-text => "Button3")->pack(qw/-side top -expand yes -pady 2/); $mw->Button(-text => "Button4")->pack(qw/-side top -expand yes -pady 2/); MainLoop;

#Make the "Button 1" and "Button 2" to be at the left,one under another use Tk; $mw=MainWindow->new(); $mw->Button(-text => "Button 10", -height => 8 )->pack(qw/-side left - expand yes -pady 2 -fill y/); $mw->Button(-text => "Button 20", -height => 8 )->pack(qw/-side left - expand yes -pady 2 -fill y/); $mw->Button(-text => "Button1")->pack(qw/-side top -expand yes - pady 2/); $mw->Button(-text => "Button2")->pack(qw/-side top -expand yes - pady 2/); $mw->Button(-text => "Button3")->pack(qw/-side top -expand yes -pady 2/); $mw->Button(-text => "Button4")->pack(qw/-side top - expand yes -pady 2/); MainLoop;

#Use Frames! use Tk; $mw=MainWindow->new(); $f1=$mw->Frame(); $f2=$mw->Frame(); $f1->Button(-text => "Button 10")->pack(qw/-side top -expand yes -pady 2 -fill y/); $f1->Button(-text => "Button 20")->pack(qw/-side top -expand yes -pady 2 -fill y/); $f2->Button(-text => "Button1")->pack(qw/-side top -expand yes -pady 2/); $f2->Button(-text => "Button2")->pack(qw/-side top -expand yes -pady 2/); $f2->Button(-text => "Button3")->pack(qw/-side top -expand yes -pady 2/); $f2->Button(-text => "Button4")->pack(qw/-side top -expand yes -pady 2/); $f1->pack(qw/-side left -expand yes -pady 2 -fill y/); $f2->pack(qw/-side left -expand yes - pady 2 -fill y/); MainLoop;

#Placer use Tk; $mw=MainWindow->new(); $mw->Button(-text => "Button1")->place(qw/-x 1 -y 1/); $mw->Button(-text => "Button2")->place(qw/-x 1 -y 1/); MainLoop;

use Tk; $mw=MainWindow->new(); $mw->Button(-text => "Button1")->place(qw/-x 4 -y 4/); $mw->Button(-text => "Button2")->place(qw/-x 1 -y 1/); MainLoop;

That is not all: Open the real application in the browser…