search for books and compare prices
Tables of Contents for Learning Perl/Tk
Chapter/Section Title
Page #
Page Count
Preface
xi
 
1. Introduction to Perl/TK
1
14
A Bit of History About Perl (and Tk)
1
1
Perl/Tk for Both Unix and Windows 95/NT
2
1
Why Use a Graphical Interface?
2
1
Why Use Perl/Tk?
3
2
Installing the Tk Module
5
1
Creating Widgets
6
2
Coding Style
8
1
Displaying a Widget
9
1
The Anatomy of an Event Loop
9
1
Hello World Example
10
2
Using exit Versus Using destroy
12
1
Naming Conventions for Widget Types
12
1
Using print for Diagnostic/Debugging Purposes
13
1
Designing Your Windows (A Short Lecture)
14
1
2. Geometry Management
15
42
Pack
16
18
Grid
34
13
Place
47
9
Geometry Management Summary
56
1
3. The Basic Button
57
24
The Button Widget
57
23
Some Fun Things to Try
80
1
4. Checkbuttons and Radiobuttons
81
21
The Checkbutton Widget
81
12
The Radiobutton Widget
93
8
Fun Things to Try
101
1
5. Label and Entry Widgets
102
22
The Label Widget
102
6
The Entry Widget
108
15
Fun Things to Try
123
1
6. Scrollbars
124
17
Defining Scrollbar Parts
124
2
The Scrolled Method
126
2
The Scrollbar Widget
128
9
Examples
137
3
Fun Things to Try
140
1
7. The Listbox Widget
141
13
Creating and Filling a Listbox
141
1
Listbox Options
142
2
Selection Modes
144
1
Colors
145
1
Listbox Style
146
1
Configuring a Listbox
147
1
Inserting Items
147
1
Deleting Items
148
1
Retrieving Elements
148
1
Selection Methods
149
1
Moving to a Specific Index
150
1
Translating Indexes
150
1
Counting Items
150
1
Active Versus Selected
150
1
Bounding Box
151
1
Finding an Index by Y Coordinate
151
1
Scrolling Methods
151
1
Listbox Example
152
1
Fun Things to Try
153
1
8. The Text Widget
154
27
Creating and Using a Text Widget
154
1
Text Widget Options
155
5
A Short Break for a Simple Example
160
1
Text Indexes
161
3
Text Tags
164
7
Inserting Text
171
1
Deleting Text
172
1
Retrieving Text
172
1
Translating Index Values
172
1
Comparing Index Values
173
1
Showing an Index
173
1
Getting the Size of a Character
173
1
Getting Line Information
173
1
Searching the Contents of a Text Widget
174
1
Scrolling
175
1
Marks
175
1
Embedding Widgets
176
3
Internal Debug Flag
179
1
Fun Things to Try
180
1
9. The Canvas Widget
181
29
Creating a Canvas
181
1
Coordinate System
182
1
The Scrollable Region
183
1
Using Bind With a Canvas
184
1
Canvas Options
184
4
Creating Items in a Canvas
188
10
Configuring the Canvas Widget
198
1
Configuring Items in the Canvas Widget
199
1
Tags
199
3
Retrieving Bounding Box Coordinates
202
1
Translating Coordinates
202
1
Moving Items Around
202
1
Changing the Display List
203
1
Deleting Items
203
1
Deleting Tags
204
1
Determining Item Type
204
1
Set Keyboard Focus
204
1
Rendering the Canvas as PostScript
204
1
Scaling the Canvas
205
1
Scanning
206
1
A Drawing Program Example
206
3
Fun Things to Try
209
1
10. The Scale Widget
210
8
Creating a Scale
210
3
Assigning a Callback
213
1
Orientation
213
1
Minimum and Maximum Values
213
1
Displayed Versus Stored Value
214
1
Adding a Label
214
1
Displaying Value Increments
214
1
Changing the Size of the Scale
215
1
Options You'll Probably Never Need
215
1
Configuring a Scale
216
1
Getting the Value of a Scale
216
1
Setting the Value of a Scale
216
1
Determining Coordinates
216
1
Identifying Parts of a Scale
216
1
Fun Things to Try
217
1
11. Menus
218
33
Different Types of Menus
218
2
The Menubutton Widget
220
16
Complete Menubutton Examples
236
2
The Menu Widget
238
10
Optionmenu Widget
248
2
Fun Things to Try
250
1
12. Frames
251
6
Creating a Frame
251
2
Frame Style
253
2
Frames Aren't Interactive
255
1
Colormap Complications
255
1
Frame Methods
256
1
Fun Things to Try
256
1
13. Toplevel Widgets
257
13
Creating a Toplevel Widget
257
3
Toplevel Methods
260
9
Review
269
1
Fun Things to Try
269
1
14. Binding Events
270
11
The bind Method
270
2
Arguments Sent to the Callback
272
1
Defining Event Sequences
273
5
Event Information
278
1
Bailing Out of a Callback Created with bind
279
1
The bindtags Method
280
1
Ways to Use bind
280
1
15. Composite Widgets
281
9
Looking at an Example Sideways
282
1
Location of Files
283
1
Creating a Composite Widget Based on Frame
284
5
Toplevel-Based Composite Widgets
289
1
16. Methods for Any Widget
290
19
Building a Family Tree
290
2
Color-Related Methods
292
1
Options Databases
293
2
The Application's Name
295
1
Widget Existence
295
1
Is the Widget Mapped?
295
1
Converting Screen Distances
295
1
Size of Widget
296
1
Widget Position
297
1
Screen Information
298
2
Atom Methods
300
1
Ringing a Bell
300
1
Clipboard Methods
300
1
Selection Methods
301
1
Destroying a Widget
302
1
Focus Methods
302
1
Grab Methods
303
1
Interapplication Communication
304
1
Waiting for Events to Happen
304
2
Parsing Command-Line Options
306
1
Time Delays
306
3
A. Configuring Widgets with configure and cget
309
22
B. Operating System Differences
331
3
C. Fonts
334
7
Index
341