Gets/sets the vertical alignment for the
UltraTreeNode.LeftImages.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Overridable Property LeftImagesAlignment As VAlign |
| C# | |
|---|
public virtual VAlign LeftImagesAlignment {get; set;} |
Example
The following sample code shows how to add multiple images to the left and right of a node's text.
| Visual Basic | Copy Code |
|---|
Imports Infragistics.Win.UltraWinTree
Private Sub button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button14.Click
Dim node As UltraTreeNode
node = Me.ultraTree1.ActiveNode
If node Is Nothing Then Return
If node.LeftImages.Count > 0 Then Return
node.Override.NodeAppearance.Image = 6
node.LeftImages.Add(0)
node.LeftImages.Add(1)
node.LeftImages.Add(2)
node.RightImages.Add(3)
node.RightImages.Add(4)
node.LeftImagesAlignment = Infragistics.Win.VAlign.Top
node.RightImagesAlignment = Infragistics.Win.VAlign.Bottom
End Sub
|
| C# | Copy Code |
|---|
using Infragistics.Win.UltraWinTree;
private void button14_Click(object sender, System.EventArgs e)
{
UltraTreeNode node = this.ultraTree1.ActiveNode;
if ( node == null ||
node.LeftImages.Count > 0 )
return;
// Note: In the following sample code we are setting
// image properties with integers. These represent
// indexes in the ImageList that was set as
// a property of the tree control. The image
// properties set below can also be set to image
// objects directly.
// Setting the image property of the node's override
// will place an image on the far left of the node.
node.Override.NodeAppearance.Image = (int)6;
// Add images to the left and right of the node's
// text. These are useful as indicator flags.
node.LeftImages.Add( (int) 0 );
node.LeftImages.Add( (int) 1 );
node.LeftImages.Add( (int) 2 );
node.RightImages.Add( (int) 3 );
node.RightImages.Add( (int) 4 );
node.LeftImagesAlignment = Infragistics.Win.VAlign.Top;
node.RightImagesAlignment = Infragistics.Win.VAlign.Bottom;
} |
See Also