{"id":6088,"date":"2022-12-20T18:57:54","date_gmt":"2022-12-20T21:57:54","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/ttktreeview-mann\/"},"modified":"2022-12-20T18:57:54","modified_gmt":"2022-12-20T21:57:54","slug":"ttktreeview-mann","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/ttktreeview-mann\/","title":{"rendered":"ttk::treeview (mann)"},"content":{"rendered":"<h1 align=\"center\">ttk::treeview<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#STANDARD OPTIONS\">STANDARD OPTIONS<\/a><br \/> <a href=\"#WIDGET-SPECIFIC OPTIONS\">WIDGET-SPECIFIC OPTIONS<\/a><br \/> <a href=\"#WIDGET COMMAND\">WIDGET COMMAND<\/a><br \/> <a href=\"#ITEM OPTIONS\">ITEM OPTIONS<\/a><br \/> <a href=\"#TAG OPTIONS\">TAG OPTIONS<\/a><br \/> <a href=\"#COLUMN IDENTIFIERS\">COLUMN IDENTIFIERS<\/a><br \/> <a href=\"#VIRTUAL EVENTS\">VIRTUAL EVENTS<\/a><br \/> <a href=\"#STYLING OPTIONS\">STYLING OPTIONS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<p>______________________________________________________________________________<\/p>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ttk::treeview \u2212 hierarchical multicolumn data display widget<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ttk::treeview<\/b> <i>pathname<\/i> ?<i>options<\/i>? ______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>ttk::treeview<\/b> widget displays a hierarchical collection of items. Each item has a textual label, an optional image, and an optional list of data values. The data values are displayed in successive columns after the tree label.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The order in which data values are displayed may be controlled by setting the <b>\u2212displaycolumns<\/b> widget option. The tree widget can also display column headings. Columns may be accessed by number or by symbolic names listed in the <b>\u2212columns<\/b> widget option; see <b>COLUMN IDENTIFIERS<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Each item is identified by a unique name. The widget will generate item IDs if they are not supplied by the caller. There is a distinguished root item, named <b>{}<\/b>. The root item itself is not displayed; its children appear at the top level of the hierarchy.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Each item also has a list of <i>tags<\/i>, which can be used to associate event bindings with individual items and control the appearance of the item.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Treeview widgets support horizontal and vertical scrolling with the standard <b>\u2212<\/b>[<b>xy<\/b>]<b>scrollcommand<\/b> options and [<b>xy<\/b>]<b>view<\/b> widget commands.<\/p>\n<h2>STANDARD OPTIONS <a name=\"STANDARD OPTIONS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"23%\">\n<p><b>\u2212class<\/b><\/p>\n<\/td>\n<td width=\"32%\">\n<p><b>\u2212cursor<\/b><\/p>\n<\/td>\n<td width=\"34%\">\n<p><b>\u2212takefocus<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"23%\">\n<p><b>\u2212style<\/b><\/p>\n<\/td>\n<td width=\"32%\">\n<p><b>\u2212xscrollcommand<\/b><\/p>\n<\/td>\n<td width=\"34%\">\n<p><b>\u2212yscrollcommand<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>\u2212padding<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">See the <b>ttk_widget<\/b> manual entry for details on the standard options.<\/p>\n<h2>WIDGET-SPECIFIC OPTIONS <a name=\"WIDGET-SPECIFIC OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212columns<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>columns<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>Columns<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">A list of column identifiers, specifying the number of columns and their names.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212displaycolumns<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>displayColumns<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>DisplayColumns<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">A list of column identifiers (either symbolic names or integer indices) specifying which data columns are displayed and the order in which they appear, or the string <b>#all<\/b>. If set to <b>#all<\/b> (the default), all columns are shown in the order given.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212height<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>height<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>Height<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">Specifies the number of rows which should be visible. Note: the requested width is determined from the sum of the column widths.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212selectmode<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>selectMode<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>SelectMode<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">Controls how the built-in class bindings manage the selection. One of <b>extended<\/b>, <b>browse<\/b>, or <b>none<\/b>.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">If set to <b>extended<\/b> (the default), multiple items may be selected. If <b>browse<\/b>, only a single item will be selected at a time. If <b>none<\/b>, the selection will not be changed.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Note that application code and tag bindings can set the selection however they wish, regardless of the value of <b>\u2212selectmode<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212show<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>show<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>Show<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">A list containing zero or more of the following values, specifying which elements of the tree to display.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"6%\">\n<p><b>tree<\/b><\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"51%\">\n<p>Display tree labels in column #0.<\/p>\n<\/td>\n<td width=\"17%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\"><b>headings<\/b><\/p>\n<p style=\"margin-left:32%;\">Display the heading row.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">The default is <b>tree headings<\/b>, i.e., show all elements.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>NOTE:<\/b> Column #0 always refers to the tree column, even if <b>\u2212show tree<\/b> is not specified.<\/p>\n<h2>WIDGET COMMAND <a name=\"WIDGET COMMAND\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>pathname<\/i> <b>bbox<\/b> <i>item<\/i> ?<i>column<\/i>?<\/p>\n<p style=\"margin-left:22%;\">Returns the bounding box (relative to the treeview widget\u2019s window) of the specified <i>item<\/i> in the form <i>x y width height<\/i>. If <i>column<\/i> is specified, returns the bounding box of that cell. If the <i>item<\/i> is not visible (i.e., if it is a descendant of a closed item or is scrolled offscreen), returns the empty list.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>cget<\/b> <i>option<\/i><\/p>\n<p style=\"margin-left:22%;\">Returns the current value of the specified <i>option<\/i>; see <i>ttk::widget(n)<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>children<\/b> <i>item<\/i> ?<i>newchildren<\/i>?<\/p>\n<p style=\"margin-left:22%;\">If <i>newchildren<\/i> is not specified, returns the list of children belonging to <i>item<\/i>.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">If <i>newchildren<\/i> is specified, replaces <i>item<\/i>\u2019s child list with <i>newchildren<\/i>. Items in the old child list not present in the new child list are detached from the tree. None of the items in <i>newchildren<\/i> may be an ancestor of <i>item<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>column<\/b> <i>column<\/i> ?<i>\u2212option<\/i> ?<i>value \u2212option value&#8230;<\/i>?<\/p>\n<p style=\"margin-left:22%;\">Query or modify the options for the specified <i>column<\/i>. If no <i>\u2212option<\/i> is specified, returns a dictionary of option\/value pairs. If a single <i>\u2212option<\/i> is specified, returns the value of that option. Otherwise, the options are updated with the specified values. The following options may be set on each column: <b><br \/> \u2212id<\/b> <i>name<\/i><\/p>\n<p style=\"margin-left:32%;\">The column name. This is a read-only option. For example, [<i>$pathname<\/i> <b>column #<\/b><i>n<\/i> <b>\u2212id<\/b>] returns the data column associated with display column #<i>n<\/i>.<\/p>\n<p style=\"margin-left:22%;\"><b>\u2212anchor<\/b> <i>anchor<\/i><\/p>\n<p style=\"margin-left:32%;\">Specifies how the text in this column should be aligned with respect to the cell. <i>Anchor<\/i> is one of <b>n<\/b>, <b>ne<\/b>, <b>e<\/b>, <b>se<\/b>, <b>s<\/b>, <b>sw<\/b>, <b>w<\/b>, <b>nw<\/b>, or <b>center<\/b>.<\/p>\n<p style=\"margin-left:22%;\"><b>\u2212minwidth<\/b> <i>minwidth<\/i><\/p>\n<p style=\"margin-left:32%;\">The minimum width of the column in pixels. The treeview widget will not make the column any smaller than <b>\u2212minwidth<\/b> when the widget is resized or the user drags a column separator. Default is 20 pixels.<\/p>\n<p style=\"margin-left:22%;\"><b>\u2212stretch<\/b> <i>boolean<\/i><\/p>\n<p style=\"margin-left:32%;\">Specifies whether or not the column width should be adjusted when the widget is resized or the user drags a column separator. <i>Boolean<\/i> may have any of the forms accepted by <b>Tcl_GetBoolean<\/b>. By default columns are stretchable.<\/p>\n<p style=\"margin-left:22%;\"><b>\u2212width<\/b> <i>width<\/i><\/p>\n<p style=\"margin-left:32%;\">The width of the column in pixels. Default is 200 pixels. The specified column width may be changed by Tk in order to honor <b>\u2212stretch<\/b> and\/or <b>\u2212minwidth<\/b>, or when the widget is resized or the user drags a column separator.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Use <i>pathname column #0<\/i> to configure the tree column.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>configure<\/b> ?<i>option<\/i>? ?<i>value option value &#8230;<\/i>?<\/p>\n<p style=\"margin-left:22%;\">Modify or query widget options; see <i>ttk::widget(n)<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>delete<\/b> <i>itemList<\/i><\/p>\n<p style=\"margin-left:22%;\">Deletes each of the items in <i>itemList<\/i> and all of their descendants. The root item may not be deleted. See also: <b>detach<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>detach<\/b> <i>itemList<\/i><\/p>\n<p style=\"margin-left:22%;\">Unlinks all of the specified items in <i>itemList<\/i> from the tree. The items and all of their descendants are still present and may be reinserted at another point in the tree with the <b>move<\/b> operation, but will not be displayed until that is done. The root item may not be detached. See also: <b>delete<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>exists<\/b> <i>item<\/i><\/p>\n<p style=\"margin-left:22%;\">Returns 1 if the specified <i>item<\/i> is present in the tree, 0 otherwise.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>focus<\/b> ?<i>item<\/i>?<\/p>\n<p style=\"margin-left:22%;\">If <i>item<\/i> is specified, sets the focus item to <i>item<\/i>. Otherwise, returns the current focus item, or <b>{}<\/b> if there is none.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>heading<\/b> <i>column<\/i> ?<i>\u2212option<\/i> ?<i>value \u2212option value&#8230;<\/i>?<\/p>\n<p style=\"margin-left:22%;\">Query or modify the heading options for the specified <i>column<\/i>. Valid options are: <b><br \/> \u2212text<\/b> <i>text<\/i><\/p>\n<p style=\"margin-left:32%;\">The text to display in the column heading.<\/p>\n<p style=\"margin-left:22%;\"><b>\u2212image<\/b> <i>imageName<\/i><\/p>\n<p style=\"margin-left:32%;\">Specifies an image to display to the right of the column heading.<\/p>\n<p style=\"margin-left:22%;\"><b>\u2212anchor<\/b> <i>anchor<\/i><\/p>\n<p style=\"margin-left:32%;\">Specifies how the heading text should be aligned. One of the standard Tk anchor values.<\/p>\n<p style=\"margin-left:22%;\"><b>\u2212command<\/b> <i>script<\/i><\/p>\n<p style=\"margin-left:32%;\">A script to evaluate when the heading label is pressed.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Use <i>pathname heading #0<\/i> to configure the tree column heading.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>identify<\/b> <i>component x y<\/i><\/p>\n<p style=\"margin-left:22%;\">Returns a description of the specified <i>component<\/i> under the point given by <i>x<\/i> and <i>y<\/i>, or the empty string if no such <i>component<\/i> is present at that position. The following subcommands are supported: <i><br \/> pathname<\/i> <b>identify region<\/b> <i>x y<\/i><\/p>\n<p style=\"margin-left:32%;\">Returns one of: <br \/> heading<\/p>\n<p style=\"margin-left:43%;\">Tree heading area; use [<b>pathname identify column<\/b> <i>x y<\/i>] to determine the heading number.<\/p>\n<p style=\"margin-left:32%;\">separator<\/p>\n<p style=\"margin-left:43%;\">Space between two column headings; [<b>pathname identify column<\/b> <i>x y<\/i>] will return the display column identifier of the heading to left of the separator.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"32%\"><\/td>\n<td width=\"6%\">\n<p>tree<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"22%\">\n<p>The tree area.<\/p>\n<\/td>\n<td width=\"35%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"32%\"><\/td>\n<td width=\"6%\">\n<p>cell<\/p>\n<\/td>\n<td width=\"5%\"><\/td>\n<td width=\"22%\">\n<p>A data cell.<\/p>\n<\/td>\n<td width=\"35%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\"><i>pathname<\/i> <b>identify item<\/b> <i>x y<\/i> Returns the item ID of the item at position <i>y<\/i>. <i><br \/> pathname<\/i> <b>identify column<\/b> <i>x y<\/i><\/p>\n<p style=\"margin-left:32%;\">Returns the display column identifier of the cell at position <i>x<\/i>. The tree column has ID <b>#0<\/b>.<\/p>\n<p style=\"margin-left:22%;\"><i>pathname<\/i> <b>identify element<\/b> <i>x y<\/i><\/p>\n<p style=\"margin-left:32%;\">The element at position <i>x,y<\/i>.<\/p>\n<p style=\"margin-left:22%;\"><i>pathname<\/i> <b>identify row<\/b> <i>x y<\/i><\/p>\n<p style=\"margin-left:32%;\">Obsolescent synonym for <i>pathname<\/i> <b>identify item<\/b>.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">See <b>COLUMN IDENTIFIERS<\/b> for a discussion of display columns and data columns.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>index<\/b> <i>item<\/i><\/p>\n<p style=\"margin-left:22%;\">Returns the integer index of <i>item<\/i> within its parent\u2019s list of children.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>insert<\/b> <i>parent index<\/i> ?<b>\u2212id<\/b> <i>id<\/i>? <i>options&#8230;<\/i><\/p>\n<p style=\"margin-left:22%;\">Creates a new item. <i>parent<\/i> is the item ID of the parent item, or the empty string <b>{}<\/b> to create a new top-level item. <i>index<\/i> is an integer, or the value <b>end<\/b>, specifying where in the list of <i>parent<\/i>\u2019s children to insert the new item. If <i>index<\/i> is less than or equal to zero, the new node is inserted at the beginning; if <i>index<\/i> is greater than or equal to the current number of children, it is inserted at the end. If <b>\u2212id<\/b> is specified, it is used as the item identifier; <i>id<\/i> must not already exist in the tree. Otherwise, a new unique identifier is generated.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>pathname<\/i> <b>insert<\/b> returns the item identifier of the newly created item. See <b>ITEM OPTIONS<\/b> for the list of available options.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>instate<\/b> <i>statespec<\/i> ?<i>script<\/i>?<\/p>\n<p style=\"margin-left:22%;\">Test the widget state; see <i>ttk::widget(n)<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>item<\/b> <i>item<\/i> ?<i>\u2212option<\/i> ?<i>value \u2212option value&#8230;<\/i>?<\/p>\n<p style=\"margin-left:22%;\">Query or modify the options for the specified <i>item<\/i>. If no <i>\u2212option<\/i> is specified, returns a dictionary of option\/value pairs. If a single <i>\u2212option<\/i> is specified, returns the value of that option. Otherwise, the item\u2019s options are updated with the specified values. See <b>ITEM OPTIONS<\/b> for the list of available options.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>move<\/b> <i>item parent index<\/i><\/p>\n<p style=\"margin-left:22%;\">Moves <i>item<\/i> to position <i>index<\/i> in <i>parent<\/i>\u2019s list of children. It is illegal to move an item under one of its descendants.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">If <i>index<\/i> is less than or equal to zero, <i>item<\/i> is moved to the beginning; if greater than or equal to the number of children, it is moved to the end.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>next<\/b> <i>item<\/i><\/p>\n<p style=\"margin-left:22%;\">Returns the identifier of <i>item<\/i>\u2019s next sibling, or <b>{}<\/b> if <i>item<\/i> is the last child of its parent.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>parent<\/b> <i>item<\/i><\/p>\n<p style=\"margin-left:22%;\">Returns the ID of the parent of <i>item<\/i>, or <b>{}<\/b> if <i>item<\/i> is at the top level of the hierarchy.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>prev<\/b> <i>item<\/i><\/p>\n<p style=\"margin-left:22%;\">Returns the identifier of <i>item<\/i>\u2019s previous sibling, or <b>{}<\/b> if <i>item<\/i> is the first child of its parent.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>see<\/b> <i>item<\/i><\/p>\n<p style=\"margin-left:22%;\">Ensure that <i>item<\/i> is visible: sets all of <i>item<\/i>\u2019s ancestors to <b>\u2212open true<\/b>, and scrolls the widget if necessary so that <i>item<\/i> is within the visible portion of the tree.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>selection<\/b> ?<i>selop itemList<\/i>?<\/p>\n<p style=\"margin-left:22%;\">If <i>selop<\/i> is not specified, returns the list of selected items. Otherwise, <i>selop<\/i> is one of the following: <i><br \/> pathname<\/i> <b>selection set<\/b> <i>itemList<\/i><\/p>\n<p style=\"margin-left:32%;\"><i>itemList<\/i> becomes the new selection.<\/p>\n<p style=\"margin-left:22%;\"><i>pathname<\/i> <b>selection add<\/b> <i>itemList<\/i><\/p>\n<p style=\"margin-left:32%;\">Add <i>itemList<\/i> to the selection<\/p>\n<p style=\"margin-left:22%;\"><i>pathname<\/i> <b>selection remove<\/b> <i>itemList<\/i><\/p>\n<p style=\"margin-left:32%;\">Remove <i>itemList<\/i> from the selection<\/p>\n<p style=\"margin-left:22%;\"><i>pathname<\/i> <b>selection toggle<\/b> <i>itemList<\/i><\/p>\n<p style=\"margin-left:32%;\">Toggle the selection state of each item in <i>itemList<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>set<\/b> <i>item<\/i> ?<i>column<\/i>? ?<i>value<\/i>?<\/p>\n<p style=\"margin-left:22%;\">With one argument, returns a dictionary of column\/value pairs for the specified <i>item<\/i>. With two arguments, returns the current value of the specified <i>column<\/i>. With three arguments, sets the value of column <i>column<\/i> in item <i>item<\/i> to the specified <i>value<\/i>. See also <b>COLUMN IDENTIFIERS<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><i>pathname<\/i> <b>state<\/b> ?<i>stateSpec<\/i>?<\/p>\n<p style=\"margin-left:22%;\">Modify or query the widget state; see <i>ttk::widget(n)<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><i>pathName<\/i> <b>tag<\/b> <i>args&#8230;<\/i><\/p>\n<p style=\"margin-left:22%;\"><i>pathName<\/i> <b>tag bind<\/b> <i>tagName<\/i> ?<i>sequence<\/i>? ?<i>script<\/i>?<\/p>\n<p style=\"margin-left:32%;\">Add a Tk binding script for the event sequence <i>sequence<\/i> to the tag <i>tagName<\/i>. When an X event is delivered to an item, binding scripts for each of the item\u2019s <b>\u2212tags<\/b> are evaluated in order as per <i>bindtags(n)<\/i>.<\/p>\n<p style=\"margin-left:32%; margin-top: 1em\"><b><KeyPress><\/b>, <b><KeyRelease><\/b>, and virtual events are sent to the focus item. <b><ButtonPress><\/b>, <b><ButtonRelease><\/b>, and <b><Motion><\/b> events are sent to the item under the mouse pointer. No other event types are supported.<\/p>\n<p style=\"margin-left:32%; margin-top: 1em\">The binding <i>script<\/i> undergoes <b>%<\/b>-substitutions before evaluation; see <b>bind(n)<\/b> for details.<\/p>\n<p style=\"margin-left:22%;\"><i>pathName<\/i> <b>tag configure<\/b> <i>tagName<\/i> ?<i>option<\/i>? ?<i>value option value&#8230;<\/i>?<\/p>\n<p style=\"margin-left:32%;\">Query or modify the options for the specified <i>tagName<\/i>. If one or more <i>option\/value<\/i> pairs are specified, sets the value of those options for the specified tag. If a single <i>option<\/i> is specified, returns the value of that option (or the empty string if the option has not been specified for <i>tagName<\/i>). With no additional arguments, returns a dictionary of the option settings for <i>tagName<\/i>. See <b>TAG OPTIONS<\/b> for the list of available options.<\/p>\n<p style=\"margin-left:22%;\"><i>pathName<\/i> <b>tag has<\/b> <i>tagName<\/i> ?<i>item<\/i>?<\/p>\n<p style=\"margin-left:32%;\">If <i>item<\/i> is specified, returns 1 or 0 depending on whether the specified item has the named tag. Otherwise, returns a list of all items which have the specified tag.<\/p>\n<p style=\"margin-left:22%;\"><i>pathName<\/i> <b>tag names<\/b><\/p>\n<p style=\"margin-left:32%;\">Returns a list of all tags used by the widget.<\/p>\n<p style=\"margin-left:22%;\"><i>pathName<\/i> <b>tag add<\/b> <i>tag items<\/i><\/p>\n<p style=\"margin-left:32%;\">Adds the specified <i>tag<\/i> to each of the listed <i>items<\/i>. If <i>tag<\/i> is already present for a particular item, then the <b>\u2212tags<\/b> for that item are unchanged.<\/p>\n<p style=\"margin-left:22%;\"><i>pathName<\/i> <b>tag remove<\/b> <i>tag<\/i> ?<i>items<\/i>?<\/p>\n<p style=\"margin-left:32%;\">Removes the specified <i>tag<\/i> from each of the listed <i>items<\/i>. If <i>items<\/i> is omitted, removes <i>tag<\/i> from each item in the tree. If <i>tag<\/i> is not present for a particular item, then the <b>\u2212tags<\/b> for that item are unchanged.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The treeview widget also supports the following generic <b>ttk::widget<\/b> widget subcommands (see <i>ttk::widget(n)<\/i> for details):<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>xview yview<\/b><\/p>\n<h2>ITEM OPTIONS <a name=\"ITEM OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following item options may be specified for items in the <b>insert<\/b> and <b>item<\/b> widget commands.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212text<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>text<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>Text<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">The textual label to display for the item.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212image<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>image<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>Image<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">A Tk image, displayed to the left of the label.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212values<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>values<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>Values<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">The list of values associated with the item.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Each item should have the same number of values as the <b>\u2212columns<\/b> widget option. If there are fewer values than columns, the remaining values are assumed empty. If there are more values than columns, the extra values are ignored.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212open<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>open<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>Open<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">A boolean value indicating whether the item\u2019s children should be displayed (<b>\u2212open true<\/b>) or hidden (<b>\u2212open false<\/b>).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Command-Line Name:<b>\u2212tags<\/b><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Name:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>tags<\/b><\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p>Database Class:<\/p>\n<\/td>\n<td width=\"75%\">\n<p><b>Tags<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">A list of tags associated with this item.<\/p>\n<h2>TAG OPTIONS <a name=\"TAG OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following options may be specified on tags: <b><br \/> \u2212foreground<\/b><\/p>\n<p style=\"margin-left:22%;\">Specifies the text foreground color.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212background<\/b><\/p>\n<p style=\"margin-left:22%;\">Specifies the cell or item background color.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>\u2212font<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p>Specifies the font to use when drawing text.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"9%\">\n<p><b>\u2212image<\/b><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"78%\">\n<p>Specifies the item image, in case the item\u2019s <b>\u2212image<\/b> option is empty.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\">Tag priority is decided by the creation order: tags created first receive higher priority.<\/p>\n<h2>COLUMN IDENTIFIERS <a name=\"COLUMN IDENTIFIERS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Column identifiers take any of the following forms:<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p style=\"margin-top: 1em\">\u2022<\/p>\n<\/td>\n<td width=\"10%\"><\/td>\n<td width=\"78%\">\n<p style=\"margin-top: 1em\">A symbolic name from the list of <b>\u2212columns<\/b>.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"10%\"><\/td>\n<td width=\"78%\">\n<p>An integer <i>n<\/i>, specifying the <i>n<\/i>th data column.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"1%\">\n<p>\u2022<\/p>\n<\/td>\n<td width=\"10%\"><\/td>\n<td width=\"78%\">\n<p>A string of the form <b>#<\/b><i>n<\/i>, where <i>n<\/i> is an integer, specifying the <i>n<\/i>th display column.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>NOTE:<\/b> Item <b>\u2212values<\/b> may be displayed in a different order than the order in which they are stored.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>NOTE:<\/b> Column #0 always refers to the tree column, even if <b>\u2212show tree<\/b> is not specified.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A <i>data column number<\/i> is an index into an item\u2019s <b>\u2212values<\/b> list; a <i>display column number<\/i> is the column number in the tree where the values are displayed. Tree labels are displayed in column #0. If <b>\u2212displaycolumns<\/b> is not set, then data column <i>n<\/i> is displayed in display column <b>#<\/b><i>n+1<\/i>. Again, <b>column #0 always refers to the tree column<\/b>.<\/p>\n<h2>VIRTUAL EVENTS <a name=\"VIRTUAL EVENTS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The treeview widget generates the following virtual events. <br \/> <<TreeviewSelect>><\/p>\n<p style=\"margin-left:22%;\">Generated whenever the selection changes.<\/p>\n<p style=\"margin-left:11%;\"><<TreeviewOpen>><\/p>\n<p style=\"margin-left:22%;\">Generated just before setting the focus item to <b>\u2212open true<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><<TreeviewClose>><\/p>\n<p style=\"margin-left:22%;\">Generated just after setting the focus item to <b>\u2212open false<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>focus<\/b> and <b>selection<\/b> widget commands can be used to determine the affected item or items.<\/p>\n<h2>STYLING OPTIONS <a name=\"STYLING OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The class name for a <b>ttk::treeview<\/b> is <b>Treeview<\/b>. The treeview header class name is <b>Heading<\/b>. The treeview item class name is <b>Item<\/b>. The treeview cell class name is <b>Cell<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Dynamic states: <b>disabled<\/b>, <b>selected<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Treeview<\/b> styling options configurable with <b>ttk::style<\/b> are:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212background<\/b> <i>color<\/i> <b><br \/> \u2212fieldbackground<\/b> <i>color<\/i> <b><br \/> \u2212font<\/b> <i>font<\/i> <b><br \/> \u2212foreground<\/b> <i>color<\/i> <b><br \/> \u2212rowheight<\/b> <i>amount<\/i><\/p>\n<p style=\"margin-left:22%;\">The <b>\u2212rowheight<\/b> value is not corrected by the <b>tk scaling<\/b> value or by the configured font size and must always be set. Also make sure that the <b>\u2212rowheight<\/b> is large enough to contain any images.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">To adjust the <b>\u2212rowheight<\/b> for the Treeview style, use the following code after <b>tk scaling<\/b> has been applied. Note that even if you do not support or change <b>tk scaling<\/b> in your program, your users may have it set in their .wishrc.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">ttk::style configure Treeview  <br \/> \u2212rowheight [expr {[font metrics <i>font<\/i> \u2212linespace] + 2}]<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Heading<\/b> styling options configurable with <b>ttk::style<\/b> are:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212background<\/b> <i>color<\/i> <b><br \/> \u2212font<\/b> <i>font<\/i> <b><br \/> \u2212relief<\/b> <i>relief<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Item<\/b> styling options configurable with <b>ttk::style<\/b> are:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212foreground<\/b> <i>color<\/i> <b><br \/> \u2212indicatormargins<\/b> <i>padding<\/i> <b><br \/> \u2212indicatorsize<\/b> <i>amount<\/i> <b><br \/> \u2212padding<\/b> <i>padding<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Cell<\/b> styling options configurable with <b>ttk::style<\/b> are:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212padding<\/b> <i>padding<\/i><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Some options are only available for specific themes.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">See the <b>ttk::style<\/b> manual page for information on how to configure ttk styles.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ttk::widget(n), listbox(n), image(n), bind(n)<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ttk::treeview \u2212 hierarchical multicolumn data display widget <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3783,1],"tags":[2635,2757],"class_list":["post-6088","post","type-post","status-publish","format-standard","hentry","category-n-comandos-tcl-tk","category-sin-categoria","tag-mann","tag-ttk_treeview"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6088","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6088"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6088\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6088"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6088"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6088"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}