📄 uitcldocs.html
字号:
<p></blockquote><h4>LOCALE</h4><blockquote><p>Tcl Windows GUI<p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>averageCharSizeGet [-title] <i>windowName</i></pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function converts the given point (or size) from dialog units to pixels.Dialog Units are used to represent the size and position of a window if thosepositions need to be device independent.<p></blockquote><h4>ARGUMENTS</h4><blockquote><p><dl><dt><b>-title</b><dd>causes <i>windowName</i> to be interpreted as the title of the window.<p><dt><i>windowName</i><dd>specifies the name or title of the window<p><dt><b>-size</b><dd> causes <i>points</i> to be interpreted as a size and not as a position </dl><p></blockquote><h4>RETURNS </h4><blockquote><p>the converted units.<p></blockquote><h4>ERRORS</h4><blockquote><p><ul><li> unable to locate window <i>window</i> </ul><p><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./UITclDocs.html#top">UITcl Library</a></b>, <b>averageCharSize</b>, <b><a href="./UITclDocs.html#pixelsToDialogUnits">pixelsToDialogUnits</a></b><hr><a name="pixelsToDialogUnits"></a><p align=right><a href="rtnIndex.html"><i>GUI Tcl Library (WINDOWS) : Tcl Procedures</i></a></p></blockquote><h1>pixelsToDialogUnits</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>pixelsToDialogUnits</strong> - conversion routine</p><p></blockquote><h4>LOCALE</h4><blockquote><p>Tcl Windows GUI<p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>averageCharSizeGet [-title] <i>windowName</i></pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function converts the given point (or size) from pixels to dialog units.Dialog Units are used to represent the size and position of a window if thosepositions need to be device independent.<p></blockquote><h4>ARGUMENTS</h4><blockquote><p><dl><dt><b>-title</b><dd>causes <i>windowName</i> to be interpreted as the title of the window.<p><dt><i>windowName</i><dd>specifies the name or title of the window<p><dt><b>-size</b><dd> causes <i>points</i> to be interpreted as a size and not as a position </dl><p></blockquote><h4>RETURNS </h4><blockquote><p>the converted units.<p></blockquote><h4>ERRORS</h4><blockquote><p><ul><li> unable to locate window <i>window</i> </ul><p><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./UITclDocs.html#top">UITcl Library</a></b>, <b>averageCharSize</b>, <b><a href="./UITclDocs.html#dialogUnitsToPixels">dialogUnitsToPixels</a></b><hr><a name="mainWindowCreate"></a><p align=right><a href="rtnIndex.html"><i>GUI Tcl Library (WINDOWS) : Tcl Procedures</i></a></p></blockquote><h1>mainWindowCreate</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>mainWindowCreate</strong> - Creates a main window for the application</p><p></blockquote><h4>LOCALE</h4><blockquote><p>Tcl Windows GUI<p></blockquote><h4>DESCRIPTION</h4><blockquote><p>Use this function to create an MSDI or an MDI main window. Every non-dialogbased application should have a main window. Depending on whether -msdi flagis used, any windows subsequently created stay inside main window's clientarea or can stay outside of the main window's client area. Also all the childwindows created after the main window are closed when the main window isclosed.<p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>mainWindowCreate [-callback <i>callbackProcedureOrScript</i>] [-exec <i>procedureOrScript</i>] [-exit <i>exitProcedureOrScript</i>] [-h|eight <i>integer</i>] [-helpfile <i>helpFilePath</i>] [-helpID <i>uniqueIntegerID</i>] [-icon <i>iconFilePath</i>] [-init <i>initProcedureOrScript</i>] [-maximize] [-menu] [-minimize] [-msdi] [-name <i>uniqueName</i>] [-statusbar] [-title <i>captionString</i>] [-toolbar] [-w|idth <i>integer</i>] [-x|pos <i>integer</i>] [-y|pos <i>integer</i>]</pre></blockquote><h4>ARGUMENTS</h4><blockquote><p><dl><dt><b>-callback</b> <i>callbackProcedureOrScript</i><dd>specifies that the Tcl script <i>callback procedure or script</i> should be calledwhenever an event occurs on this window such as sizing, initialization, etc.If this flag is used, -init, -exit or -exec are ignored.<p><dt><b>-exec</b> <i>procedureOrScript</i><dd>specifies procedure or script to be evaluated after the main window iscreated and initialized.<p><dt><b>-exit</b> <i>exitProcedureOrScript</i><dd>specifies that the Tcl script <i>exitProcedureOrScript</i> should be called whenthe window is exiting, after it is erased from the screen. Use it to free anyresources.<p><dt><b>-helpfile</b> <i>helpFilePath</i><dd>provides a separate help file for the window's help. If not provided, theapplication's help file is used for context-sensitive help.<p><dt><b>-helpID</b> <i>uniqueIntegerID</i><dd>provides an ID associated with the window for context-sensitive help. Itreferences a topic in <i>helpFilePath</i> or the application's help file if<b>-helpfile</b> isn't specified.<p><dt><b>-icon</b> <i>iconFilePath</i><dd>icon used to display when this main window is minimized.<p><dt><b>-init</b> <i>initProcedureOrScript</i><dd>specifies that the Tcl script <i>initProcedureOrScript</i> is called when thewindow is initialized, after the controls are instantiated but before thewindow is drawn for the user. For information on the specification ofcontrols, see <b><a href="./UITclDocs.html#controlCreate">controlCreate</a></b> and<i>Introduction</i>: DIALOGS, WINDOWS AND CONTROLS.<p><dt><b>-maximize</b><dd>if this flag is specified, the window is created as a maximized window. Amaximized window occupies the whole desktop area.<p><dt><b>-menu</b><dd>if this flag is not specified, no default menu is created as part of windowcreation. A menu can be associated with this window at a later time by using<b>windowMenuSet</b>.<p><dt><b>-minimize</b><dd>if this flag is specified, the window is created as a minimized window. Aminimized window is the same size as an icon. Windows displays a minimizedmain window at the bottom of the screen.<p><dt><b>-msdi</b><dd>specifies that the window should be an msdi main window. An MSDI main windowcan have controls in its client area. Any windows created using <b><a href="./UITclDocs.html#windowCreate">windowCreate</a></b>stay outside the client area of the main window unlike the non-MSDI window oran MDI main window.<p><dt><b>-name</b> <i>uniqueName</i><dd>uses <i>uniqueName</i> as the name of the window for future reference. Most of theUITcl API require a window name when a property of the window needs to bechanged or queried about.<p><dt><b>-statusbar</b><dd>if this flag is not specified, no default toolbar is created as part of windowcreation<p><dt><b>-title</b> <i>captionString</i><dd>specifies the title for the window.<p><dt><b>-toolbar</b><dd>if this flag is not specified, no default toolbar is created as part of windowcreation. A toolbar can be associated with this window at a later time byusing <b><a href="./UITclDocs.html#toolbarCreate">toolbarCreate</a></b>.<p><dt><b>-x|pos</b> <i>integer</i>, <b>-y|pos</b> <i>integer</i>, <b>-w|idth</b> <i>integer</i>, and <b>-h|eight</b> <i>integer</i><dd> specify the position and size for the new window in dialog units. Ifomitted, they are given default values. </dl><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./UITclDocs.html#top">UITcl Library</a></b>, <i>DIALOGS, WINDOWS, AND CONTROLS <b>Tcl Windows GUI</b> </i><hr><a name="dialogCreate"></a><p align=right><a href="rtnIndex.html"><i>GUI Tcl Library (WINDOWS) : Tcl Procedures</i></a></p></blockquote><h1>dialogCreate</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>dialogCreate</strong> - Creates a dialog</p><p></blockquote><h4>LOCALE</h4><blockquote><p>Tcl Windows GUI<p></blockquote><h4>DESCRIPTION</h4><blockquote><p>The named dialog is created and displayed. Both modal and modeless dialogscan be created using this command. A modal dialog does not allow access toits parent window but allows access to its child windows. A modeless dialogstays on top of all windows but does allow access to its parent.<p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>dialogCreate [-callback <i>callbackProcedureOrScript</i>] [-c|ontrols <i>listOfControls</i>] [-exit <i>exitProcedureOrScript</i>] [-h|eight <i>integer</i>] [-helpfile <i>helpFilePath</i>] [-helpID <i>uniqueIntegerID</i>] [-icon <i>filePath</i>] [-init <i>initProcedureOrScript</i>] [-keepontop] [-maxibox] [-minibox] [-modeless] [-name <i>uniqueName</i>] [-nocontexthelp] [-noframe] [-notitle] [-parent] [-sizingframe] [-thickframe] [-thinframe] [-title <i>captionString</i>] [-titleframe] [-w|idth <i>integer</i>] [-x|pos <i>integer</i>] [-y|pos <i>integer</i>]</pre></blockquote><h4>ARGUMENTS</h4><blockquote><p><p><dl><dt><b>-callback</b> <i>callbackProcedureOrScript</i><dd>specifies that the Tcl script <i>callback procedure or script</i> should be calledwhenever an event occurs on this window such as sizing, initialization, etc.If this flag is used, -init and -exit are ignored.<p><dt><b>-c|ontrols</b> <i>controlsDefinition</i><dd>specifies a list of controls that is instantiated before the dialog isshown.<p><dt><b>-exit</b> <i>exitProcedureOrScript</i><dd>specifies that the Tcl script <i>exitProcedureOrScript</i> should be called whenthe dialog is exiting, after it is erased from the screen. Use it to free anyresources.<p><dt><b>-helpfile</b> <i>helpFilePath</i><dd>provides a separate help file for the window's help. If not provided, theapplication's help file is used for context-sensitive help.<p><dt><b>-helpID</b> <i>uniqueIntegerID</i><dd>provides an ID associated with the dialog for context-sensitive help. Itreferences a topic in <i>helpFilePath</i> or the application's help file if<b>-helpfile</b> isn't specified.<p><dt><b>-icon</b> <i>iconFilePath</i><dd>icon used to display when this main window is minimized.<p><dt><b>-init</b> <i>initProcedureOrScript</i><dd>specifies that the Tcl script <i>initProcedureOrScript</i> is called when thedialog is initialized, after the controls are instantiated but before thewindow is drawn for the user. For information on the specification ofcontrols, see <b><a href="./UITclDocs.html#controlCreate">controlCreate</a></b> and<i>Introduction</i>: DIALOGS, WINDOWS AND CONTROLS.<p><dt><b>-keepontop</b><dd>keeps the dialog on top of all other dialogs. Every dialog that uses thisoption is drawn on the top over the other top windows. So, the dialog thatuses this option last remains as top window.<p><dt><b>-maxibox</b><dd>draws a button on top right corner of the window that allows the dialog to bemaximized (occupies the whole desktop area).<p><dt><b>-minibox</b><dd>draws a button on top right corner of the window that allows the dialog to beiconized.<p><dt><b>-modeless</b><dd>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -