stk/Help/frame.n.html

158 lines
7.1 KiB
HTML
Raw Normal View History

1996-09-27 06:29:02 -04:00
<HTML><HEAD><TITLE>Tk Built-In Commands - frame manual page</TITLE></HEAD>
1998-04-10 06:59:06 -04:00
<BR>
1996-09-27 06:29:02 -04:00
<BODY bgcolor = #c3c3ff>
<H2><IMG ALIGN=BOTTOM SRC="./Img/ManPageBlue.gif"> frame</H2>
<I>Create and manipulate frame widgets</I><P><IMG ALIGN=TOP SRC="./Img/line-red.gif">
<H3><A NAME="M2">SYNOPSIS</A></H3>
(<B>frame</B><I> widget-name ?options</I>?)<BR>
<H3><A NAME="M3">STANDARD OPTIONS</A></H3>
<PRE>
<B><A HREF="options.n.html#M:borderwidth">:borderwidth</A></B> <B><A HREF="options.n.html#M:cursor">:cursor</A></B>
<B><A HREF="options.n.html#M:highlightbackground">:highlightbackground</A></B> <B><A HREF="options.n.html#M:highlightcolor">:highlightcolor</A></B>
<B><A HREF="options.n.html#M:highlightthickness">:highlightthickness</A></B> <B><A HREF="options.n.html#M:relief">:relief</A></B>
<B><A HREF="options.n.html#M:takefocus">:takefocus</A></B>
</PRE>
<H3><A NAME="M11">WIDGET-SPECIFIC OPTIONS</A></H3>
<DL>
<P>
<DT><I>Name</I>: <B>background</B>
<DT><I>Class</I>: <B>Background</B>
<DT><I>Option keyword</I>: <B><A NAME="M12">:background</A></B>
<DT><I>STklos slot name</I>: <B>background</B>
<DD>This option is the same as the standard <B>background</B> option
except that its value may also be specified as an empty string.
In this case, the widget will display no background or border, and
no colors will be consumed from its colormap for its background
and border.
<P>
<P>
<DT><I>Name</I>: <B>class</B>
<DT><I>Class</I>: <B>Class</B>
<DT><I>Option keyword</I>: <B><A NAME="M13">:class</A></B>
<DT><I>STklos slot name</I>: <B>class</B>
<DD>Specifies a class for the window.
This class will be used when querying the option database for
the window's other options, and it will also be used later for
other purposes such as bindings.
The <B>class</B> option may not be changed with the <B>configure</B>
widget procedure.
<P>
<P>
<DT><I>Name</I>: <B>colormap</B>
<DT><I>Class</I>: <B>Colormap</B>
<DT><I>Option keyword</I>: <B><A NAME="M14">:colormap</A></B>
<DT><I>STklos slot name</I>: <B>colormap</B>
<DD>Specifies a colormap to use for the window.
The value may be either <B>new</B>, in which case a new colormap is
created for the window and its children, or the name of another
window (which must be on the same screen and have the same visual
as <I>widget-name</I>), in which case the new window will use the colormap
from the specified window.
If the <B>colormap</B> option is not specified, the new window
uses the same colormap as its parent.
This option may not be changed with the <B>configure</B>
widget procedure.
<P>
<P>
1998-04-10 06:59:06 -04:00
<DT><I>Name</I>: <B>container</B>
<DT><I>Class</I>: <B>Container</B>
<DT><I>Option keyword</I>: <B><A NAME="M15">:container</A></B>
<DT><I>STklos slot name</I>: <B>container</B>
<DD>The value must be a boolean. If true, it means that this window will
be used as a container in which some other application will be embedded
(for example, a Tk toplevel can be embedded using the <B>:use</B> option).
The window will support the appropriate window manager protocols for
things like geometry requests. The window should not have any
children of its own in this application.
This option may not be changed with the <B>configure</B>
widget command.
<P>
<P>
1996-09-27 06:29:02 -04:00
<DT><I>Name</I>: <B>height</B>
<DT><I>Class</I>: <B>Height</B>
1998-04-10 06:59:06 -04:00
<DT><I>Option keyword</I>: <B><A NAME="M16">:height</A></B>
1996-09-27 06:29:02 -04:00
<DT><I>STklos slot name</I>: <B>height</B>
<DD>Specifies the desired height for the window in any of the forms
acceptable to <B>Tk_GetPixels</B>.
If this option is less than or equal to zero then the window will
not request any size at all.
<P>
<P>
<DT><I>Name</I>: <B>visual</B>
<DT><I>Class</I>: <B>Visual</B>
1998-04-10 06:59:06 -04:00
<DT><I>Option keyword</I>: <B><A NAME="M17">:visual</A></B>
1996-09-27 06:29:02 -04:00
<DT><I>STklos slot name</I>: <B>visual</B>
<DD>Specifies visual information for the new window in any of the
forms accepted by <B>Tk_GetVisual</B>.
If this option is not specified, the new window will use the same
visual as its parent.
The <B>visual</B> option may not be modified with the <B>configure</B>
widget procedure.
<P>
<P>
<DT><I>Name</I>: <B>width</B>
<DT><I>Class</I>: <B>Width</B>
1998-04-10 06:59:06 -04:00
<DT><I>Option keyword</I>: <B><A NAME="M18">:width</A></B>
1996-09-27 06:29:02 -04:00
<DT><I>STklos slot name</I>: <B>width</B>
<DD>Specifies the desired width for the window in any of the forms
acceptable to <B>Tk_GetPixels</B>.
If this option is less than or equal to zero then the window will
not request any size at all.
<P>
</DL>
1998-04-10 06:59:06 -04:00
<H3><A NAME="M19">DESCRIPTION</A></H3>
1996-09-27 06:29:02 -04:00
The <B>frame</B> procedure creates a new window (given by the
<I>widget-name</I> argument) and makes it into a frame widget.
Additional
options, described above, may be specified on the procedure line
or in the option database
to configure aspects of the frame such as its background color
and relief. The <B>frame</B> procedure returns the
path name of the new window.
<P>
A frame is a simple widget. Its primary purpose is to act as a
spacer or container for complex window layouts. The only features
of a frame are its background color and an optional 3-D border to make the
frame appear raised or sunken.
1998-04-10 06:59:06 -04:00
<H3><A NAME="M20">WIDGET PROCEDURE</A></H3>
1996-09-27 06:29:02 -04:00
The <B>frame</B> procedure creates a new STk procedure whose
name is the same as the path name of the frame's window. This
procedure may be used to invoke various
operations on the widget. It has the following general form:
<PRE>(<I>widget-name option </I>?<I>arg arg ...</I>?)</PRE>
<I>PathName</I> is the name of the procedure, which is the same as
the frame widget's path name. <I>Option</I> and the <I>arg</I>s
determine the exact behavior of the procedure. The following
procedures are possible for frame widgets:
<P>
<DL>
1998-04-10 06:59:06 -04:00
<DT><A NAME="M21">(<I>widget-name '</I><B>cget</B> <I>option</I>)</A><DD>
1996-09-27 06:29:02 -04:00
Returns the current value of the configuration option given
by <I>option</I>.
<I>Option</I> may have any of the values accepted by the <B>frame</B>
procedure.
<P>
1998-04-10 06:59:06 -04:00
<DT><A NAME="M22">(<I>widget-name </I><B>configure</B> ?<I>option</I>? <I>?value option value ...</I>?)</A><DD>
1996-09-27 06:29:02 -04:00
Query or modify the configuration options of the widget.
If no <I>option</I> is specified, returns a list describing all of
the available options for <I>widget-name</I> (see <B>Tk_ConfigureInfo</B> for
information on the format of this list). If <I>option</I> is specified
with no <I>value</I>, then the procedure returns a list describing the
one named option (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I> is specified). If
one or more <I>option-value</I> pairs are specified, then the procedure
modifies the given widget option(s) to have the given value(s); in
this case the procedure returns an empty string.
<I>Option</I> may have any of the values accepted by the <B>frame</B>
procedure.
<P>
</DL>
1998-04-10 06:59:06 -04:00
<H3><A NAME="M23">BINDINGS</A></H3>
1996-09-27 06:29:02 -04:00
When a new frame is created, it has no default event bindings:
frames are not intended to be interactive.
1998-04-10 06:59:06 -04:00
<P><IMG ALIGN=TOP SRC="./Img/line-red.gif"><P>
1996-09-27 06:29:02 -04:00
<A HREF=./STk-hlp.html><IMG ALIGN=BOTTOM SRC="./Img/RefBookBlue.gif"> Back to the <B>STk</B> main page</A>
</BODY></HTML>