Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

ProgressValue Property, SftTreeCell Object

Defines the cell's progress bar value.

Syntax

Get

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

Put

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

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

VB.NET

        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

VB6

        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

C#

            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

C++

    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

See Also SftTreeCell Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2022 Softel vdm, Inc.