O'Reilly logo

Learning Perl/Tk by Nancy Walsh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Methods for Any Widget

So far, most of the chapters in this book have concentrated on specific widgets. This chapter covers the methods that apply to all widgets. You'll probably never need most of these methods, but there are a few that you'll use frequently.

Many times, you'll use a MainWindow reference (usually $mwin our examples) to call these methods, but you can also call them from other widgets, such as $button, $checkbutton, and so on. Most of the methods are informational only, meaning you pass no arguments to them; you only get a value back.

We'll use the generic $widget here instead of a specific widget type. This will help you to remember that these are multipurpose methods.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required