📄 uitcldocs.html
字号:
</ul><p><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./UITclDocs.html#top">UITcl Library</a></b>, <b><a href="./UITclDocs.html#windowClose">windowClose</a></b>, <b><a href="./UITclDocs.html#allControlsDestroy">allControlsDestroy</a></b>, <b><a href="./UITclDocs.html#dialogCreate">dialogCreate</a></b><hr><a name="fileDialogCreate"></a><p align=right><a href="rtnIndex.html"><i>GUI Tcl Library (WINDOWS) : Tcl Procedures</i></a></p></blockquote><h1>fileDialogCreate</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>fileDialogCreate</strong> - create a standard file browser dialog</p><p></blockquote><h4>LOCALE</h4><blockquote><p>Tcl Windows GUI<p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>fileDialogCreate [-createprompt] [-defaultfilter <i>defaultfilter</i>] [-filefilters <i>filefilters</i>] [-filemustexist] [-init <i>initProcOrScript</i>] [-multiselect] [-name <i>aUniqueName</i>] [-nochangedir] [-nonetworkbutton] [-nolongnames] [-noreadonlyreturn] [-okbuttontitle <i>titleString</i>] [-overwriteprompt] [-pathmustexist] [-readonly] [-readonlypref <i>varName</i>] [-savefile] [-showreadonly] [-title <i>windowTitleCaption</i>]</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>Creates a standard Windows file selection dialog enabling the userto select or specify file(s) for reading or writing.<p></blockquote><h4>ARGUMENTS</h4><blockquote><p><p><dl><dt><b>-createprompt</b><dd>warns the user if the file doesn't exist.<p><dt>`-filefilters<dd>a list of <b>|</b> delimited filters to be applied to the contents of thecurrent directory before displaying it in the file listbox; the displayedresult is the conjunction of filter selection sets. An example filter(including the required <b>||</b> terminator at the end of the list) is:<pre>"Chart Files (*.xlc) | *.xlc | Worksheet Files (*.xls) | *.xls \| Data Files (*.xlc;*.xls) | *.xlc; *.xls | All Files (*.*) | *.* ||"</pre><p><dt><b>-filemustexist</b><dd>allows the user to select an existing file only.<p><dt><b>-multiselect</b><dd>allows the user to select more than one file. (<b>-multiselect</b> cannot beused with <b>-savefile</b>.)<p><dt><b>-nochangedir</b><dd>prevents the user from changing to a new directory.<p><dt><b>-nolongnames</b><dd>screens the user's entry of a new file name for DOS 8+3 convention; a badmatch is refused.<p><dt><b>-nonetworkbutton</b><dd>hides the network button, preventing the user from browsing the network.<p><dt><b>-noreadonlyreturn</b><dd>returns only files that do not have the Read Only Check Box checked andare not in a write-protected directory.<p><dt><b>-okbuttontitle</b><dd>sets the OK button's title to <i>titleString</i>.<p><dt><b>-overwriteprompt</b><dd>warns the user if the file already exists (for save operations).<p><dt><b>-pathmustexist</b><dd>validates the filename and path for the user's entry; refuses invalid ones.<p><dt><b>-readonly</b><dd>checks AND displays the read-only checkbox; enables the display ofreadonly files.<p><dt><b>-readonlypref</b><dd>saves the final state of the Read Only Check Box to the Tcl variable<i>varName</i>.<p><dt><b>-savefile</b><dd>specifies file save mode (rather than file select).<p><dt><b>-showreadonly</b><dd>displays a read-only checkbox, allowing the user to enable the display ofread-only files.<p><dt><b>-title</b><dd> sets the dialog's title to <i>windowTitleCaption</i>. </dl><p></blockquote><h4>RETURNS </h4><blockquote><p>A file name or list of file names selected by the user.<p></blockquote><h4>ERRORS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./UITclDocs.html#top">UITcl Library</a></b>, <b><a href="./UITclDocs.html#dialogCreate">dialogCreate</a></b>, <b><a href="./UITclDocs.html#dirBrowseDialogCreate">dirBrowseDialogCreate</a></b><p></blockquote><h4>EXAMPLE</h4><blockquote><p><pre>proc on_tgtsvr_bkEndLogFileBrowse {args} { global tsCfg_backendLogFileName set pathName [join [fileDialogCreate \ -filefilters "All Files (*.*)|*.*||" -title "Log File" \ -okbuttontitle "OK" -savefile -overwriteprompt]] if {$pathName != ""} { set tsCfg_backendLogFileName $pathName controlValuesSet tsCfgDlg.tgtsvr_backend_logfile_text \ $tsCfg_backendLogFileName }}</pre><hr><a name="dirBrowseDialogCreate"></a><p align=right><a href="rtnIndex.html"><i>GUI Tcl Library (WINDOWS) : Tcl Procedures</i></a></p></blockquote><h1>dirBrowseDialogCreate</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>dirBrowseDialogCreate</strong> - create a standard directory browser dialog</p><p></blockquote><h4>LOCALE</h4><blockquote><p>Tcl Windows GUI<p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>dirBrowseDialogCreate [-file <i>fileToSearch</i>] [-initialdir <i>initialDirectoryToStart</i>] [-okbuttontitle <i>titleString</i>] [-title <i>windowTitleCaption</i>]</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>Creates a standard Windows directory-browse dialog enabling the userto select or specify a directory.<p></blockquote><h4>ARGUMENTS</h4><blockquote><p><dl><dt><b>-file</b> <i>fileToSearch</i><dd>specifies the file name to search for.<p><dt><b>-initialdir</b> <i>initialDirectoryToStart</i><dd>specifies the first directory to search.<p><dt><b>-okbuttontitle</b> <i>titleString</i><dd>sets the OK button's title to <i>titleString</i>.<p><dt><b>-title</b> <i>titleString</i><dd> sets the dialog's title to <i>windowTitleCaption</i>. </dl><p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>ERRORS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./UITclDocs.html#top">UITcl Library</a></b>, <b><a href="./UITclDocs.html#dialogCreate">dialogCreate</a></b>, <b><a href="./UITclDocs.html#fileDialogCreate">fileDialogCreate</a></b><hr><a name="windowClientSizeGet"></a><p align=right><a href="rtnIndex.html"><i>GUI Tcl Library (WINDOWS) : Tcl Procedures</i></a></p></blockquote><h1>windowClientSizeGet</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>windowClientSizeGet</strong> - retrieves the size of the client area of a dialog or window</p><p></blockquote><h4>LOCALE</h4><blockquote><p>Tcl Windows GUI<p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>windowClientSizeGet [-pixels] <i>windowName</i></pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function obtains the size of the client area in dialog units or pixelsif specified.<p></blockquote><h4>ARGUMENTS</h4><blockquote><p><dl><dt><b>-pixels</b><dd>specifies whether the width and height need to be in pixels.<p><dt><i>windowName</i><dd> specifies the name of the window. </dl><p></blockquote><h4>RETURNS </h4><blockquote><p>A list containing { <i>width</i> <i>height</i> } in dialog units.<p></blockquote><h4>ERRORS</h4><blockquote><p><ul><li> missing required control name in <i>routine</i></li><li> unable to locate window name <i>window</i></li><li> unable to locate control name <i>control</i> </ul><p><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./UITclDocs.html#top">UITcl Library</a></b>, <b><a href="./UITclDocs.html#controlSizeGet">controlSizeGet</a></b>, <b><a href="./UITclDocs.html#windowSizeGet">windowSizeGet</a></b>, <b><a href="./UITclDocs.html#windowSizeSet">windowSizeSet</a></b><hr><a name="windowSizeSet"></a><p align=right><a href="rtnIndex.html"><i>GUI Tcl Library (WINDOWS) : Tcl Procedures</i></a></p></blockquote><h1>windowSizeSet</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>windowSizeSet</strong> - sets the size of a dialog or window</p><p></blockquote><h4>LOCALE</h4><blockquote><p>Tcl Windows GUI<p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>windowSizeSet <i>windowName</i> [-pixels] <i>width</i> <i>height</i></pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function sets the width and height of a dialog or window.<p></blockquote><h4>ARGUMENTS</h4><blockquote><p><dl><dt><i>windowName</i><dd>specifies the name of the window.<p><dt><b>-pixels</b><dd>specifies whether the width and height are in pixels.<p><dt><i>width</i> and <i>height</i><dd> specify these parameters in dialog units or pixels </dl><p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>ERRORS</h4><blockquote><p><ul><li> missing required control name in <i>routine</i></li><li> unable to locate window name <i>window</i></li><li> unable to locate control name <i>control</i> </ul><p><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./UITclDocs.html#top">UITcl Library</a></b>, <b><a href="./UITclDocs.html#windowSizeSet">windowSizeSet</a></b>, <b><a href="./UITclDocs.html#windowClientSizeGet">windowClientSizeGet</a></b>, <b><a href="./UITclDocs.html#windowPositionSet">windowPositionSet</a></b><hr><a name="windowPositionSet"></a><p align=right><a href="rtnIndex.html"><i>GUI Tcl Library (WINDOWS) : Tcl Procedures</i></a></p></blockquote><h1>windowPositionSet</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>windowPositionSet</strong> - sets the position of a dialog or window</p><p></blockquote><h4>LOCALE</h4><blockquote><p>Tcl Windows GUI<p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>windowPositionSet <i>windowName</i> [-pixels] <i>xpos</i> <i>ypos</i></pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function sets the position of a dialog or window.<p></blockquote><h4>ARGUMENTS</h4><blockquote><p><dl><dt><i>windowName</i><dd>specifies the name of the window whose position is to be set.<p><dt><b>-pixels</b><dd>specifies whether the xpos and ypos are in pixels.<p><dt><i>xpos</i> and <i>ypos</i><dd> specifies the x and y coordinates of the window in dialog units. </dl>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -