Skip to content

Replies

0
Brian Fallon
Brian Fallon answered on Mar 16, 2009 4:19 PM

Assuming you are going with the unbound column solution, you add the column in response to the ColumnSetGenerated event, and assign the actual value for each node in response to the InitializeDataNode event:

private void ultraTree1_ColumnSetGenerated(object sender, ColumnSetGeneratedEventArgs e)
{
    TreeColumnsCollection columns = e.ColumnSet.Columns;
    UltraTreeNodeColumn imageColumn = columns.Add( "Image" );
    imageColumn.DataType = typeof(System.Drawing.Image);
}

private void ultraTree1_InitializeDataNode(object sender, InitializeDataNodeEventArgs e)
{
    if ( e.Reinitialize == false )
    {
        Image image = Image.FromFile( @"C:\Wherever\whatever.bmp");
        e.Node.SetCellValue( e.Node.DataColumnSetResolved.Columns["Image"], image );
    }
}

0
Brian Fallon
Brian Fallon answered on Jan 6, 2009 2:35 PM

I am not aware of any intrinsic support for this in the .NET TreeView control. If you like you can submit a feature request for the ability to control this in UltraTree via a property setting.

0
Brian Fallon
Brian Fallon answered on Dec 18, 2008 2:29 PM

An Override object is exposed by the control itself, so set UltraTree.Override.NodeDoubleClickAction.

0
Brian Fallon
Brian Fallon answered on Dec 10, 2008 2:34 PM

[quote user="bedfordn"]Is it safe to say there's no appearance property on the control itself for a node when it doesn't have focus?[/quote]

No, there is no Appearance designated specifically for when the control does not have focus. If you like you can submit a feature request for such a property.

0
Brian Fallon
Brian Fallon answered on Dec 5, 2008 3:27 PM

private Infragistics.Win.Appearance focusedAppearance = new Infragistics.Win.Appearance();
private Infragistics.Win.Appearance notFocusedAppearance = new Infragistics.Win.Appearance();

this.notFocusedAppearance.BackColor = SystemColors.ControlDark;
this.focusedAppearance.BackColor = SystemColors.Highlight;

this.ultraTree1.Override.SelectedNodeAppearance = this.focusedAppearance;
this.ultraTree1.Enter += new EventHandler(this.ultraTree1_Enter);
this.ultraTree1.Leave += new EventHandler(this.ultraTree1_Leave);
this.ultraTree1.HideSelection = false;

private void ultraTree1_Leave(object sender, EventArgs e)
{
    UltraTree tree = sender as UltraTree;
    tree.Override.SelectedNodeAppearance = this.notFocusedAppearance;
}

private void ultraTree1_Enter(object sender, EventArgs e)
{
    UltraTree tree = sender as UltraTree;
    tree.Override.SelectedNodeAppearance = this.focusedAppearance;           
}

0
Brian Fallon
Brian Fallon answered on Nov 17, 2008 2:33 PM

The Form class exposes a method, 'ValidateChildren', which triggers the Validating event for each child of the form. If you want to call the event handler directly, you should not use CancelEventArgs.Empty, but rather a new instance of CancelEventArgs, because the static Empty property is inherited from the System.EventArgs class, and you need a strongly-typed CancelEventArgs instance to call the event handler directly. Also, the value of the 'sender' parameter should probably be uiTextBox, not this, in case the handler logic is expecting the sender to be of a specific type.

0
Brian Fallon
Brian Fallon answered on Nov 12, 2008 2:06 PM

No, the control does not support showing scrollbars for a group. If you like you can submit a feature request the ability to do that.