asp.net.ph

TreeNodeStyle Class

System.Web.UI.WebControls Namespace


.NET Framework version 2.0

Represents the style of a node in a TreeView control.

TreeNodeStyle Class Members

Collapse   Constructors

Visibility Constructor Parameters
public TreeNodeStyle ( )
public TreeNodeStyle ( StateBag bag )

Collapse   Properties

Visibility Name Value Type Accessibility
public ChildNodesPadding Unit [ Get , Set ]
public HorizontalPadding Unit [ Get , Set ]
public ImageUrl String [ Get , Set ]
public NodeSpacing Unit [ Get , Set ]
public VerticalPadding Unit [ Get , Set ]

Collapse   Methods

Visibility Name Parameters Return Type
public CopyFrom ( Style s ) Void
protected FillStyleAttributes ( CssStyleCollection attributes , IUrlResolutionService urlResolver ) Void
public MergeWith ( Style s ) Void
public Reset ( ) Void

Remarks

Use the TreeNodeStyle class to represent the style of a node in a TreeView control. The TreeView control allows you to specify different style characteristics ( such as font size and color ) for each of the different node types.

The following table lists the available node styles you can specify for the TreeView.

Node style property Description
HoverNodeStyle The style settings for a node when the mouse pointer is positioned over it.
LeafNodeStyle The style settings for the leaf nodes.
NodeStyle The default style settings for a node.
ParentNodeStyle The style settings for the parent nodes.
RootNodeStyle The style settings for the root node.
SelectedNodeStyle The style settings for a selected node.

The TreeNodeStyle class inherits most of its members from the Style class. It extends the Style class by providing properties that control the amount of space around the text in a node, as well as the space between adjacent nodes.

Use the HorizontalPadding property to control the amount of space to the left and right of the text in a node. Similarly, use the VerticalPadding property to control the amount of space above and below the text in a node.

To control the amount of spacing between the node that the TreeNodeStyle is applied to and its adjacent nodes, use the NodeSpacing property. To control the amount of spacing between a parent node and a child node, use the ChildNodesPadding property.

See Also

LevelStyles Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph