HeaderPane
Main
Hide
Share Link
Print

ProgressValue Property, SftTreeCell Object

Defines the cell's progress bar value.

Syntax

Get

C#int Value = object.ProgressValue;
VB.NETValue = object.ProgressValue As Integer
C++long Value = object->ProgressValue;
long Value = object->GetProgressValue();
CHRESULT object->get_ProgressValue(long* Value);
VBValue = object.ProgressValue As Long

Put

C#int object.ProgressValue = Value;
VB.NETobject.ProgressValue = Value As Integer
C++long object->ProgressValue = Value;
void object->PutProgressValue(long Value);
CHRESULT object->put_ProgressValue(long Value);
VBobject.ProgressValue = Value As Long

object

A SftTreeCell object.

Value

Defines the cell's background progress bar value (between 0 and Cell.ProgressMax, inclusive).

Comments

The ProgressValue property defines the cell's background progress bar value.

The progress bar is rendered as cell background, with the cell text and image displayed in the cell as usual. For a partial height progress bar, the cell background is also rendered using the defined background colors.

The ProgressValue property defines the current value (between 0 and Cell.ProgressMax, inclusive) of the progress bar and the progress bar is rendered proportionally to the size of the cell.

The progress bar for a cell is rendered using the colors defined with the Cell.ProgressColor and Cell.ProgressColorEnd properties. The orientation of the gradient fill can be defined using the Cell.ProgressColorOrientation property. The appearance of the progress bar can be defined with the Cell.ProgressStyle property.

A progress bar is only shown for the cell if its Cell.ProgressMax property is set to a value other than 0.

Examples

C# View entire sample code

            axSftTree1.Dock = DockStyle.Fill;

            int itemIndex = axSftTree1.Items.Add("Progress Bars");
            axSftTree1.get_Cell(itemIndex, 1).Text = "SftTree/OCX supports progress bars as cell background (partial or full size).";

            int i = axSftTree1.Items.Add("Progress Bar - Full Size");
            axSftTree1.get_Item(i).Level = 1;
            axSftTree1.get_Cell(i, 0).ProgressMax = 100;  // maximum value 0-100
            axSftTree1.get_Cell(i, 0).ProgressValue = 33; // current value

            i = axSftTree1.Items.Add("Progress Bar - Partial");
            axSftTree1.get_Item(i).Level = 1;
            axSftTree1.get_Cell(i, 0).ProgressColorOrientation = SftTreeOrientationDefaultConstants.horizontalDefaultOrientationSftTree;
            axSftTree1.get_Cell(i, 0).ProgressStyle = SftTreeProgressStyleDefaultConstants.smallDefaultProgressStyleSftTree;
            axSftTree1.get_Cell(i, 0).ProgressMax = 200;  // maximum value 0-200
            axSftTree1.get_Cell(i, 0).ProgressValue = 33; // current value

VB.NET View entire sample code

        ItemIndex = AxSftTree1.Items.Add("Progress Bars")
        AxSftTree1.get_Cell(ItemIndex, 1).Text = "SftTree/OCX supports progress bars as cell background (partial or full size)."

        Dim I As Integer
        I = AxSftTree1.Items.Add("Progress Bar - Full Size")
        AxSftTree1.get_Item(I).Level = 1
        AxSftTree1.get_Cell(I, 0).ProgressMax = 100  ' maximum value 0-100
        AxSftTree1.get_Cell(I, 0).ProgressValue = 33 ' current value

        I = AxSftTree1.Items.Add("Progress Bar - Partial")
        AxSftTree1.get_Item(I).Level = 1
        AxSftTree1.get_Cell(I, 0).ProgressColorOrientation = SftTreeOrientationDefaultConstants.horizontalDefaultOrientationSftTree
        AxSftTree1.get_Cell(I, 0).ProgressStyle = SftTreeProgressStyleDefaultConstants.smallDefaultProgressStyleSftTree
        AxSftTree1.get_Cell(I, 0).ProgressMax = 200  ' maximum value 0-200
        AxSftTree1.get_Cell(I, 0).ProgressValue = 33 ' current value

C++ View entire sample code

    ASSERT(m_vTree != NULL);

    long ItemIndex = m_vTree->Items->Add("Progress Bars");
    m_vTree->Cell[ItemIndex][1]->Text = _T("SftTree/OCX supports progress bars as cell background (partial or full size).");

    long i = m_vTree->Items->Add("Progress Bar - Full Size");
    m_vTree->Item[i]->Level = 1;
    m_vTree->Cell[i][0]->ProgressMax = 100;  // maximum value 0-100
    m_vTree->Cell[i][0]->ProgressValue = 33; // current value

    i = m_vTree->Items->Add("Progress Bar - Partial");
    m_vTree->Item[i]->Level = 1;
    m_vTree->Cell[i][0]->ProgressColorOrientation = horizontalDefaultOrientationSftTree;
    m_vTree->Cell[i][0]->ProgressStyle = smallDefaultProgressStyleSftTree;
    m_vTree->Cell[i][0]->ProgressMax = 200;  // maximum value 0-200
    m_vTree->Cell[i][0]->ProgressValue = 33; // current value

VB6 View entire sample code

        ItemIndex = .Items.Add("Progress Bars")
        .Cell(ItemIndex, 1).Text = "SftTree/OCX supports progress bars as cell background (partial or full size)."
        
        ' add progress bar samples
        
        I = .Items.Add("Progress Bar - Full Size")
        .Item(I).Level = 1
        .Cell(I, 0).ProgressMax = 100    ' maximum value 0-100
        .Cell(I, 0).ProgressValue = 33   ' current value

        I = .Items.Add("Progress Bar - Partial")
        .Item(I).Level = 1
        .Cell(I, 0).ProgressColorOrientation = horizontalDefaultOrientationSftTree
        .Cell(I, 0).ProgressStyle = smallDefaultProgressStyleSftTree
        .Cell(I, 0).ProgressMax = 200    ' maximum value 0-200
        .Cell(I, 0).ProgressValue = 33   ' current value

See Also SftTreeCell Object | Object Hierarchy


Last Updated 11/03/2026 - (email)
© 2026 Softel vdm, Inc.