Widgets
Widgets in Perl/Tk are created with widget
creation commands, which include Button
, Canvas
, CheckButton
, Entry
, Frame
, Label
, Listbox
, Menu
, Menubutton
, Message
, Radiobutton
, Scale
, Scrollbar
, Text
, and Toplevel
, among many, many others.
Positioning widgets is done with geometry
managers. In the “Hello World” example shown earlier, the
pack
command is the geometry
manager. Geometry managers determine where in the window (or frame)
the widget will sit. We’ll talk more about the Perl/Tk geometry
managers later in this chapter.
Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.