![]() ![]() Gets or sets the object that contains data about the tree node. Gets the parent tree node of the current tree node. Gets the collection of TreeNode objects assigned to the current tree node. Gets the zero-based depth of the tree node in the TreeView control. Gets a value indicating whether the tree node is visible or partially visible. Gets a value indicating whether the tree node is in the selected state. Gets a value indicating whether the tree node is in the expanded state. Gets a value indicating whether the tree node is in an editable state. Gets the position of the tree node in the tree node collection. Gets the path from the root tree node to the current tree node. Gets the first child tree node in the tree node collection. Gets or sets the shortcut menu associated with this tree node. Gets the shortcut menu that is associated with this tree node. Gets or sets a value indicating whether the tree node is in a checked state. Gets or sets the background color of the tree node. The following are some of the commonly used properties of the TreeNode class − Sr.No. To be able to use a TreeView control we need to have a look at some commonly used properties and methods of the TreeNode class. Each node in a TreeView control is an object of the TreeNode class. The TreeNode class represents a node of a TreeView. ![]() Occurs when the value of the RightToLeftLayout property changes. Occurs when the value of the Padding property changes. Occurs when the mouse hovers over a TreeNode. Occurs when the user double-clicks a TreeNode with the mouse. Occurs when the user clicks a TreeNode with the mouse. Occurs when the user begins dragging a node. Occurs before the tree node label text is edited. Occurs before the tree node is collapsed. Occurs before the tree node check box is checked. Occurs after the tree node check box is checked. The following are some of the commonly used events of the TreeView control − Sr.No. Returns a string containing the name of the control. Sorts all the items in the tree view control. The following are some of the commonly used methods of the TreeView control − Sr.No.Ĭollapses all the nodes including all child nodes in the tree view control. Gets the number of tree nodes that can be fully visible in the tree view control. ![]() Gets or sets the implementation of IComparer to perform a custom sort of the TreeView nodes. Gets or sets the first fully-visible tree node in the tree view control. Gets or sets the image list that is used to indicate the state of the TreeView and its nodes. Gets or sets a value indicating whether the tree nodes in the tree view are sorted. Gets or sets a value indicating whether lines are drawn between the tree nodes that are at the root of the tree view. Gets or sets a value indicating whether plus-sign (+) and minus-sign (-) buttons are displayed next to tree nodes that contain child tree nodes. Gets or sets a value indicating ToolTips are shown when the mouse pointer hovers over a TreeNode. Gets or sets a value indicating whether lines are drawn between tree nodes in the tree view control. Gets or sets the tree node that is currently selected in the tree view control. Gets or sets the key of the default image shown when a TreeNode is in a selected state. Gets or sets the image list index value of the image that is displayed when a tree node is selected. Gets or sets a value indicating whether the tree view control displays scroll bars when they are needed. Gets or sets a value that indicates whether the TreeView should be laid out from right-to-left. Gets or sets the delimiter string that the tree node path uses. Gets the collection of tree nodes that are assigned to the tree view control. Gets or sets the height of each tree node in the tree view control. The current foreground color for this control, which is the color the control uses to draw its text. Gets or sets the height of the font of the control. Gets or sets the font of the text displayed by the control. Gets or sets a value indicating whether check boxes are displayed next to the tree nodes in the tree view control. Gets or sets the border style of the tree view control. Gets or sets the layout of the background image for the TreeView control. Gets or set the background image for the TreeView control. Gets or sets the background color for the control. The following are some of the commonly used properties of the TreeView control − Sr.No. Let's click on a TreeView control from the Toolbox and place it on the form. Each node may contain one or more child nodes. The TreeView control is used to display hierarchical representations of items similar to the ways the files and folders are displayed in the left pane of the Windows Explorer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |