⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 panedwindow.n

📁 linux 下的源代码分析阅读器 red hat公司新版
💻 N
字号:
'\"'\" Copyright (c) 1995 DSC Technologies Corporation'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\"'\" @(#) panedwindow.n 1.21 94/12/17 16:04:44'/" .so man.macros.HS panedwindow iwid.BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEpanedwindow \- Create and manipulate a paned window widget.SH SYNOPSIS\fBpanedwindow\fI \fIpathName \fR?\fIoptions\fR?.SH "INHERITANCE"itk::Widget <- panedwindow.SH "STANDARD OPTIONS".LP.nf.ta 4c 8c 12c\fBbackground\fR	\fBcursor\fR.fi.LPSee the "options" manual entry for details on the standard options..SH "WIDGET-SPECIFIC OPTIONS".LP.nfName:	\fBheight\fRClass:	\fBHeight\fRCommand-Line Switch:	\fB-height\fR.fi.IPSpecifies the overall height of the paned window in any of the forms acceptable to \fBTk_GetPixels\fR.  The default is 10 pixels..LP.nfName:	\fBorient\fRClass:	\fBOrient\fRCommand-Line Switch:	\fB-orient\fR.fi.IPSpecifies the orientation of the separators: \fBvertical\fR or \fBhorizontal\fR.  The default is horizontal..LP.nfName:	\fBsashBorderWidth\fRClass:	\fBBorderWidth\fRCommand-Line Switch:	\fB-sashborderwidth\fR.fi.IPSpecifies a value indicating the width of the 3-D border to draw around the outside of the sash in any of the forms acceptable to \fBTk_GetPixels\fR.  The default is 2 pixels..LP.nfName:	\fBsashCursor\fRClass:	\fBCursor\fRCommand-Line Switch:	\fB-sashcursor\fR.fi.IPSpecifies the type of cursor to be displayed in the sash.  The defaultis crosshair..LP.nfName:	\fBsashHeight\fRClass:	\fBHeight\fRCommand-Line Switch:	\fB-sashheight\fR.fi.IPSpecifies the height of the sash in any of the forms acceptable to \fBTk_GetPixels\fR.  The default is 10 pixels..LP.nfName:	\fBsashIndent\fRClass:	\fBSashIndent\fRCommand-Line Switch 	\fBsashindent\fR.fi.IPSpecifies the placement of the sash along the panes in any of the forms acceptable to \fBTk_GetPixels\fR.  A positivevalue causes the sash to be offset from the near (left/top) sideof the pane, and a negative value causes the sash to be offset fromthe far (right/bottom) side.  If the offset is greater than the width, then the sash is placed flush against the side.  Thedefault is -10 pixels..LP.nfName:	\fBsashWidth\fRClass:	\fBWidth\fRCommand-Line Switch:	\fB-sashwidth\fR.fi.IPSpecifies the width of the sash in any of the forms acceptable to \fBTk_GetPixels\fR.  The default is 10 pixels..LP.nfName:	\fBthickness\fRClass:	\fBThickness\fRCommand-Line Switch:	\fB-thickness\fR.fi.IPSpecifies the thickness of the separators in any of the forms acceptable to \fBTk_GetPixels\fR.  The default is 3 pixels..LP.LP.nfName:	\fBwidth\fRClass:	\fBWidth\fRCommand-Line Switch:	\fB-width\fR.fi.IPSpecifies the overall width of the paned window in any of the forms acceptable to \fBTk_GetPixels\fR.  The default is 10 pixels..LP.BE.SH DESCRIPTION.PPThe \fBpanedwindow\fR command creates a multiple paned window widget capable of orienting the paneseither vertically or horizontally.  Each pane is itself a frame actingas a child site for other widgets.  The border separating each pane contains a sash which allows user positioning of the panes relative toone another.  .SH "METHODS".PPThe \fBpanedwindow\fR command creates a new Tcl command whosename is \fIpathName\fR.  Thiscommand may be used to invoke variousoperations on the widget.  It has the following general form:.DS C\fIpathName option \fR?\fIarg arg ...\fR?.DE\fIOption\fR and the \fIarg\fRsdetermine the exact behavior of the command.  .PPMany of the widget commands for the \fBpanedwindow\fR take as one argument anindicator of which pane of the paned window to operate on.  These indicatorsare called \fIindexes\fR and allow reference and manipulation of panes regardless of their current map state.  Paned window indexes may be specified in any of the following forms:.TP 12\fInumber\fRSpecifies the pane numerically, where 0 corresponds to the nearest (top/left-most) pane of the paned window. .TP 12\fBend\fRIndicates the farthest (bottom/right-most) pane of the paned window..TP 12\fIpattern\fRIf the index doesn't satisfy one of the above forms then thisform is used.  \fIPattern\fR is pattern-matched against the tag ofeach pane in the panedwindow, in order from left/top to right/left,until a matching entry is found.  The rules of \fBTcl_StringMatch\fRare used..SH "WIDGET-SPECIFIC METHODS".TP\fIpathName \fBadd\fR \fItag\fR ?\fIoption value option value\fR?Adds a new pane to the paned window on the far side (right/bottom).  The following options may be specified:.RS.TP\fB-margin\fR \fIvalue\fRSpecifies the border distance between the pane and pane contents is any ofthe forms acceptable to \fBTk_GetPixels\fR.  The default is 8 pixels..TP\fB-minimum\fR \fIvalue\fRSpecifies the minimum size that a pane's contents may reach notinclusive of twice the margin in any of the forms acceptable to \fBTk_GetPixels\fR.  The default is 10 pixels.The \fBadd\fR method returns the path name of the pane..RE.TP\fIpathName \fBcget\fR \fIoption\fRReturns the current value of the configuration option givenby \fIoption\fR.\fIOption\fR may have any of the values accepted by the \fBpanedwindow\fRcommand..TP\fIpathName \fBchildsite\fR ?\fIindex\fR?Returns a list of the child site path names or a specific child site given an index.  The list is constructed from the near side (left/top) to the far side (right/bottom)..TP\fIpathName\fR \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?Query or modify the configuration options of the widget.If no \fIoption\fR is specified, returns a list describing all ofthe available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR forinformation on the format of this list).  If \fIoption\fR is specifiedwith no \fIvalue\fR, then the command returns a list describing theone named option (this list will be identical to the correspondingsublist of the value returned if no \fIoption\fR is specified).  Ifone or more \fIoption\-value\fR pairs are specified, then the commandmodifies the given widget option(s) to have the given value(s);  inthis case the command returns an empty string.\fIOption\fR may have any of the values accepted by the \fBpanedwindow\fRcommand..TP\fIpathName \fBdelete\fR \fIindex\fRDeletes a specified pane given an \fIindex\fR..TP\fIpathName \fBfraction\fR \fIpercentage\fR \fIpercentage\fR ?\fIpercentage percentage ...\fR?Sets the visible percentage of the panes.  Specifies a set ofpercentages which are applied to the visible panes from the near side(left/top).  The number of percentages must be equal to the current numberof visible (mapped) panes and add up to 100..TP\fIpathName \fBhide\fR \fIindex\fRChanges the visiblity of the specified pane, allowing a previously displayedpane to be visually removed rather than deleted..TP\fIpathName \fBindex\fR \fIindex\fRReturns the numerical index corresponding to index..TP\fIpathName \fBinsert \fIindex\fR \fItag\fR ?\fIoption value option value ...\fR?Same as the \fBadd\fR command except that it inserts the newpane just before the one given by \fIindex\fR, instead of appendingto the end of the panedwindow.  The \fIoption\fR, and \fIvalue\fRarguments have the same interpretation as for the \fBadd\fR widgetcommand.  .TP\fIpathName \fBpaneconfigure\fR \fIindex\fR ?\fIoptions\fR?This command is similar to the \fBconfigure\fR command, except thatit applies to the options for an individual pane, whereas \fBconfigure\fRapplies to the options for the paned window as a whole.\fIOptions\fR may have any of the values accepted by the \fBadd\fRwidget command.  If \fIoptions\fR are specified, options are modifiedas indicated in the command and the command returns an empty string.If no \fIoptions\fR are specified, returns a list describingthe current options for entry \fIindex\fR (see \fBTk_ConfigureInfo\fR forinformation on the format of this list)..TP\fIpathName \fBreset\fRRedisplays the pane window using default percentages..TP\fIpathName \fBshow\fR \fIindex\fRChanges the visiblity of the specified pane, allowing a previously hiddenpane to be displayed..SH "NOTES".IPDynamic changing of the margin and or minimum options to values whichmake the current configuration invalid will block subsequent sashmovement until the fractions are modified via the fraction method.For example a panedwindow is created with three panes and the minimumand margin options are at their default settings.  Next the user movesthe sashes to compact the panes to one side.  Now, if the minimum isincreased on the most compressed pane via the paneconfigure method to a large enough value, then sash movement is blockeduntil the fractions are adjusted.  This situation is unusual and undernormal operation of the panedwindow, this problem will never occur..LP.SH EXAMPLE.DS panedwindow .pw -width 300 -height 300  .pw add top .pw add middle -margin 10 .pw add bottom -margin 10 -minimum 10 pack .pw -fill both -expand yes foreach pane [.pw childSite] {    button $pane.b -text $pane -relief raised -borderwidth 2    pack $pane.b -fill both -expand yes } .pw fraction 50 30 20 .pw paneconfigure 0 -minimum 20 .pw paneconfigure bottom -margin 15.DE.SH ACKNOWLEDGEMENTS:.LPJay Schmidgall.IP1994 - Base logic posted to comp.lang.tcl.LPJoe Hidebrand <hildjj@fuentez.com>.IP07/25/94 - Posted first multipane version to comp.lang.tcl.LP.IP07/28/94 - Added support for vertical panes.LPKen Copeland <ken@hilco.com>.IP09/28/95 - Smoothed out the sash movement and added squeezable panes..LP.SH AUTHORMark L. Ulferts.SH KEYWORDSpanedwindow, widget

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -