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

📄 tree.html

📁 是TCL的另外一个编译(解释)器
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<HTML><HEAD><TITLE>Tree</TITLE></HEAD><BODY BGCOLOR=white><DL><DT><I><A HREF="#descr">NAME</A></I></DT><DD><B>Tree</B> - Tree widget</DD></DL><DL><DT><I>CREATION</I></DT><DD><A HREF="#descr"><B>Tree</B></A> <I>pathName</I> ?<I>option value...</I>?</DD></DL><DL><DT><I>STANDARD OPTIONS</I></DT><DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD><TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectbackground">-selectbackground</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-selectforeground">-selectforeground</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-xscrollcommand">-xscrollcommand</A></TR><TD>&nbsp;&nbsp;<A HREF="options.htm#M-yscrollcommand">-yscrollcommand</A></TR></TR></TABLE></DD></DL><DL><DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT><DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0><TR><TD>&nbsp;&nbsp;<A HREF="#-closecmd">-closecmd</A></TR><TD>&nbsp;&nbsp;<A HREF="#-deltax">-deltax</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-deltay">-deltay</A></TR><TD>&nbsp;&nbsp;<A HREF="#-dragenabled">-dragenabled</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-dragendcmd">-dragendcmd</A></TR><TD>&nbsp;&nbsp;<A HREF="#-dragevent">-dragevent</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-draginitcmd">-draginitcmd</A></TR><TD>&nbsp;&nbsp;<A HREF="#-dragtype">-dragtype</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-dropcmd">-dropcmd</A></TR><TD>&nbsp;&nbsp;<A HREF="#-dropenabled">-dropenabled</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-dropovercmd">-dropovercmd</A></TR><TD>&nbsp;&nbsp;<A HREF="#-dropovermode">-dropovermode</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-droptypes">-droptypes</A></TR><TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-linesfill">-linesfill</A></TR><TD>&nbsp;&nbsp;<A HREF="#-linestipple">-linestipple</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-opencmd">-opencmd</A></TR><TD>&nbsp;&nbsp;<A HREF="#-padx">-padx</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-redraw">-redraw</A></TR><TD>&nbsp;&nbsp;<A HREF="#-showlines">-showlines</A></TR></TR><TR><TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR></TABLE></DD></DL><DL><DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT><DD><I>pathName</I> <A HREF="#bindImage"><B>bindImage</B></A> <I>event</I> <I>script</I></DD><DD><I>pathName</I> <A HREF="#bindText"><B>bindText</B></A> <I>event</I> <I>script</I></DD><DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A> <I>option</I></DD><DD><I>pathName</I> <A HREF="#closetree"><B>closetree</B></A> <I>node</I></DD><DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A> ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?</DD><DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A> ?<I>arg...</I>?</DD><DD><I>pathName</I> <A HREF="#edit"><B>edit</B></A> <I>node</I> <I>text</I> ?<I>verifycmd</I>? ?<I>clickres</I>? ?<I>select</I>?</DD><DD><I>pathName</I> <A HREF="#exists"><B>exists</B></A> <I>node</I></DD><DD><I>pathName</I> <A HREF="#index"><B>index</B></A> <I>node</I></DD><DD><I>pathName</I> <A HREF="#insert"><B>insert</B></A> <I>index</I> <I>parent</I> <I>node</I> ?<I>option value...</I>?</DD><DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A> <I>node</I> <I>option</I></DD><DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A> <I>node</I> ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?</DD><DD><I>pathName</I> <A HREF="#move"><B>move</B></A> <I>parent</I> <I>node</I> <I>index</I></DD><DD><I>pathName</I> <A HREF="#nodes"><B>nodes</B></A> <I>node</I> ?<I>first</I>? ?<I>last</I>?</DD><DD><I>pathName</I> <A HREF="#opentree"><B>opentree</B></A> <I>node</I></DD><DD><I>pathName</I> <A HREF="#parent"><B>parent</B></A> <I>node</I></DD><DD><I>pathName</I> <A HREF="#reorder"><B>reorder</B></A> <I>node</I> <I>neworder</I></DD><DD><I>pathName</I> <A HREF="#see"><B>see</B></A> <I>node</I></DD><DD><I>pathName</I> <A HREF="#selection"><B>selection</B></A> <I>cmd</I> ?<I>arg...</I>?</DD><DD><I>pathName</I> <A HREF="#visible"><B>visible</B></A> <I>node</I></DD><DD><I>pathName</I> <A HREF="#xview"><B>xview</B></A> ?<I>arg...</I>?</DD><DD><I>pathName</I> <A HREF="#yview"><B>yview</B></A> ?<I>arg...</I>?</DD></DL><BR><HR WIDTH="100%"><BR><B><A NAME="descr"></A>DESCRIPTION</B><BR><P><B>Tree</B> widget uses canvas to display a hierarchical list of items (called nodes).Each node is composed of a label with its own font and foreground attributes, and an optionalimage or window. Each node can have a list of subnodes, which can be collapsed or expanded.Each node is drawn in a single line, whose height is defined by the<B>deltay</B> option, so they must have at most this height.A node is uniquely identified by a string given at creation (by the<B>insert</B> command). The node named <I>root</I> is the root ofthe tree and is not drawn.The tree structure is directly maintained by the widget.</P><BR><HR WIDTH="50%"><BR><B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR><DL><DT><A NAME="-closecmd"><B>-closecmd</B></A></DT><DD>Specifies a command to be called when user close a node. Theclosed node is appended to the command.</DD></DL><DL><DT><A NAME="-deltax"><B>-deltax</B></A></DT><DD>Specifies horizontal indentation between a node and its children.</DD></DL><DL><DT><A NAME="-deltay"><B>-deltay</B></A></DT><DD>Specifies vertical size of the nodes.</DD></DL><DL><DT><A NAME="-dragenabled"><B>-dragenabled</B></A></DT><DD>A boolean specifying if drag is enabled.</DD></DL><DL><DT><A NAME="-dragendcmd"><B>-dragendcmd</B></A></DT><DD>Specifies a command to be called when drag ended.<B>dragendcmd</B> must be a command conforming to the description of theoption <B>dragendcmd</B> of <B>DragSite::<A HREF="DragSite.html#register">register</A></B>.</DD></DL><DL><DT><A NAME="-dragevent"><B>-dragevent</B></A></DT><DD>Specifies the number of the mouse button associated to the drag.Must be <B>1</B>, <B>2</B> or <B>3</B>.</DD></DL><DL><DT><A NAME="-draginitcmd"><B>-draginitcmd</B></A></DT><DD>Tree has a command wrapper for <I>drag-init</I> events. This command refused the dragif no node is designated. In other cases:<BR>If <B>draginitcmd</B> is empty, it returns:<UL><LI>the value of option <B>dragtype</B> or <I>TREE_NODE</I> if empty as the data type, <LI><I>{copy move link}</I> as the operations, <LI>the node identifier as the data.</UL>If <B>draginitcmd</B> is not empty, it is called with the following arguments:<UL><LI>the pathname of the tree,<LI>the identifier of the dragged node,<LI>the toplevel created to represent dragged data.</UL>and must return a value conforming to <B>draginitcmd</B> option described in<B>DragSite::<A HREF="DragSite.html#register">register</A></B>.</DD></DL><DL><DT><A NAME="-dragtype"><B>-dragtype</B></A></DT><DD>Specifies an alternate type of dragged object.</DD></DL><DL><DT><A NAME="-dropcmd"><B>-dropcmd</B></A></DT><DD>Tree has a command wrapper for <I>drop</I> events. This command stops auto scrollingand extract node and position.<BR>If <B>dropcmd</B> is not empty, it is called with the following arguments:<UL><LI>the pathname of the tree,<LI>the pathname of the drag source,<LI>a list describing where the drop occurs. It can be:<UL><LI><I>{</I><B>widget</B><I>}</I>,<LI><I>{</I><B>node</B> <I>node}</I> or<LI><I>{</I><B>position</B> <I>node index}</I>.</UL><LI>the current operation,<LI>the data type,<LI>the data.</UL></DD></DL><DL><DT><A NAME="-dropenabled"><B>-dropenabled</B></A></DT><DD>A boolean specifying if drop is enabled.</DD></DL><DL><DT><A NAME="-dropovercmd"><B>-dropovercmd</B></A></DT><DD>Tree has a command wrapper for <I>drag-over</I> events. This command enables auto scrollingand position extraction during the <I>drag-over</I>.If <B>dropovercmd</B> is not empty, the command is called with the following aguments:<UL><LI>the pathname of the tree,<LI>the pathname of the drag source,<LI>a list describing where the drop can occur, whose elements are:<UL><LI>the string <I>widget</I> if <B>dropovertype</B> option contains <I>w</I>, else empty string.<LI>the targeted node if drag icon points a node and <B>dropovertype</B> option contains <I>n</I>, else empty string.<LI>a list containing a node and the position within the children of the node where drag icon points to if <B>dropovertype</B> option contains <I>p</I>, else empty string.<LI>optionally, the preferred method if drop can occur both inside a node and between twonodes. The value is <I>position</I> or <I>node</I>.</UL><LI>the current operation,<LI>the data type,<LI>the data.</UL>The command must return a list with two elements:<UL><LI>the drop status, conforming to those described in <B>dropovercmd</B> option of<B>DropSite::<A HREF="DropSite.html#register">register</A></B>,<LI>the choosen method: <I>widget</I>, <I>node</I> or <I>position</I>.</UL></DD></DL><DL><DT><A NAME="-dropovermode"><B>-dropovermode</B></A></DT><DD>Specifies the type of <I>drop-over</I> interaction. Must be a combination of<B>w</B>, which specifies that drop can occurs everywhere on widget,<B>p</B>, which specifies that drop can occurs between two nodes,and <B>n</B>, which specifies that drop occurs inside nodes.</DD></DL><DL><DT><A NAME="-droptypes"><B>-droptypes</B></A></DT><DD>Specifies a list of accepted dropped object/operation.See option <B>droptypes</B> of<B>DropSite::<A HREF="DropSite.html#register">register</A></B>.for more infromation.<BR>Default is <I>TREE_NODE</I> with operations <B>copy</B> and <B>move</B>.</DD></DL><DL><DT><A NAME="-height"><B>-height</B></A></DT><DD>Specifies the desired height for the tree in units of <B>deltay</B> pixels.</DD>

⌨️ 快捷键说明

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