1Toplevel(3)           User Contributed Perl Documentation          Toplevel(3)
2
3
4

NAME

6       Tk::Toplevel - Create and manipulate Toplevel widgets
7

SYNOPSIS

9           $toplevel = $parent->Toplevel(?options?);
10

STANDARD OPTIONS

12       -borderwidth   -highlightbackground     -highlightthickness -takefocus
13       -class    -highlightcolor     -relief -cursor
14
15       See Tk::options for details of the standard options.
16

WIDGET-SPECIFIC OPTIONS

18       Name:     background
19       Class:    Background
20       Switch:   -background
21           This option is the same as the standard background option except
22           that its value may also be specified as an undefined value.  In
23           this case, the widget will display no background or border, and no
24           colors will be consumed from its colormap for its background and
25           border.
26
27       Name:     colormap
28       Class:    Colormap
29       Switch:   -colormap
30           Specifies a colormap to use for the window.  The value may be
31           either new, in which case a new colormap is created for the window
32           and its children, or the name of another window (which must be on
33           the same screen and have the same visual as $widget), in which case
34           the new window will use the colormap from the specified window.  If
35           the colormap option is not specified, the new window uses the
36           default colormap of its screen.  This option may not be changed
37           with the configure method.
38
39       Name:     container
40       Class:    Container
41       Switch:   -container
42           The value must be a boolean.  If true, it means that this window
43           will be used as a container in which some other application will be
44           embedded (for example, a Tk toplevel can be embedded using the -use
45           option).  The window will support the appropriate window manager
46           protocols for things like geometry requests.  The window should not
47           have any children of its own in this application.  This option may
48           not be changed with the configure method.
49
50       Name:     height
51       Class:    Height
52       Switch:   -height
53           Specifies the desired height for the window in any of the forms
54           acceptable to Tk_GetPixels.  If this option is less than or equal
55           to zero then the window will not request any size at all.
56
57       Name:     menu
58       Class:    Menu
59       Switch:   -menu
60           Specifies a menu widget to be used as a menubar. On the Macintosh,
61           the menubar will be displayed accross the top of the main monitor.
62           On Microsoft Windows and all UNIX platforms, the menu will appear
63           accross the toplevel window as part of the window dressing
64           maintained by the window manager.
65
66       Name:     ""
67       Class:    ""
68       Switch:   -screen
69           Specifies the screen on which to place the new window.  Any valid
70           screen name may be used, even one associated with a different
71           display.  Defaults to the same screen as its parent.  This option
72           is special in that it may not be specified via the option database,
73           and it may not be modified with the configure method.
74
75       Switch:   -title
76           Specifies the title of the toplevel window.
77
78       Name:     use
79       Class:    Use
80       Switch:   -use
81           This option is used for embedding. If the value isn't an empty
82           string, it must be the the window identifier of a container window,
83           specified as a hexadecimal string like the ones returned by the
84           winfo id command. The toplevel widget will be created as a child of
85           the given container instead of the root window for the screen.  If
86           the container window is in a Tk application, it must be a frame or
87           toplevel widget for which the -container option was specified.
88           This option may not be changed with the configure method.
89
90       Name:     visual
91       Class:    Visual
92       Switch:   -visual
93           Specifies visual information for the new window in any of the forms
94           accepted by Tk_GetVisual.  If this option is not specified, the new
95           window will use the default visual for its screen.  The visual
96           option may not be modified with the configure method.
97
98       Name:     width
99       Class:    Width
100       Switch:   -width
101           Specifies the desired width for the window in any of the forms
102           acceptable to Tk_GetPixels.  If this option is less than or equal
103           to zero then the window will not request any size at all.
104

DESCRIPTION

106       The Toplevel method creates a new toplevel widget (given by the $widget
107       argument).  Additional options, described above, may be specified on
108       the command line or in the option database to configure aspects of the
109       toplevel such as its background color and relief.  The toplevel command
110       returns the path name of the new window.
111
112       A toplevel is similar to a frame except that it is created as a top-
113       level window:  its X parent is the root window of a screen rather than
114       the logical parent from its path name.  The primary purpose of a
115       toplevel is to serve as a container for dialog boxes and other
116       collections of widgets.  The only visible features of a toplevel are
117       its background color and an optional 3-D border to make the toplevel
118       appear raised or sunken.
119

WIDGET METHODS

121       The Toplevel method creates a widget object.  This object supports the
122       configure and cget methods described in Tk::options which can be used
123       to enquire and modify the options described above.  The widget also
124       inherits all the methods provided by the generic Tk::Widget class, and
125       the Tk::Wm class.
126

BINDINGS

128       When a new toplevel is created, it has no default event bindings:
129       toplevels are not intended to be interactive.
130

SEE ALSO

132       Tk::Widget Tk::Wm
133

KEYWORDS

135       toplevel, widget
136
137
138
139perl v5.28.0                      2018-07-15                       Toplevel(3)
Impressum