Main > Programming > Libraries >

Tkx::Tutorial 1.04

Tkx::Tutorial 1.04

Sponsored Links

Tkx::Tutorial 1.04 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.024 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 881
Date added: 2007-07-21
Publisher: ActiveState

Tkx::Tutorial 1.04 description

Tkx::Tutorial Perl module contains a tutorial about how to use Tkx.

Tk is a toolkit that allows you to create applications with graphical interfaces for Windows, Mac OS X and X11. The Tk toolkit is native to the Tcl programming language, but its ease of use and cross-platform availability has made it the GUI toolkit of choice for many other dynamic languages as well.

Tkx is a Perl module that makes the Tk toolkit available to Perl programs. By loading the Tkx module Perl programs can create windows and fill them with text, images, buttons and other controls that make up the user interface of the application.

Hello World

Lets start with the mandatory exercise of creating an application that greats the world. Here we make the application window contain a single button which will shut down the application if clicked. The code to make this happen is:

use Tkx;

Tkx::button(".b",
-text => "Hello, world",
-command => sub { Tkx::destroy("."); },
);
Tkx::pack(".b");

Tkx::MainLoop()

Save this to a file called hello.pl and then run perl hello.pl to start up the application. A window with the text "Hello, world" should appear on your screen.
After the Tkx module has been loaded by the use Tkx statement the application will show an empty window called ".". We create a button with the name ".b" and tell the window to display the button with the call to Tkx::pack(). After the layout of the window has been set up we need to pass control back to Tk so that it can draw the window and invoke our callback if the button is clicked. This is achieved by the Tkx::MainLoop() call at the end. Clicking the button will invoke the subroutine registered with the -command option of the button. In this case the callback simply destroys the window, which in turn will terminate the application.

Tkx::Tutorial 1.04 Screenshot

Advertisements

Tkx::Tutorial 1.04 Keywords

Bookmark Tkx::Tutorial 1.04

Hyperlink code:
Link for forum:

Tkx::Tutorial 1.04 Copyright

WareSeeker periodically updates pricing and software information of Tkx::Tutorial 1.04 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Tkx::Tutorial 1.04 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
yagg::Tutorial is a Perl module that contains a tutorial for yagg. Free Download
Test::Unit::Tutorial is a Perl module that contains a tutorial on unit testing. Free Download
Task::Catalyst::Tutorial is a Perl module that installs everything you need to learn Catalyst. Free Download
XML::Smart::Tutorial is a Perl module with tutorials and examples for XML::Smart. Free Download
Gantry::Docs::Tutorial is a Perl module for The Gantry Tutorial. Free Download
Games::ScottAdams::Tutorial is a Perl module with the Scott Adams Adventure Compiler Tutorial. Free Download
Apache::Storage is Perl module containing simple functions to store and retrieve information from within the Apache process. Free Download
Text::Emoticon::GoogleTalk is a Perl module emoticon filter of GoogleTalk. Free Download