Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

ProgressMax Property, SftTreeCell Object

Defines the cell's progress bar maximum value (0 to turn off).

Syntax

Get

VB.NETValue = object.ProgressMax As Integer
VBValue = object.ProgressMax As Long
C#.NETint Value = object.ProgressMax;
VC++long Value = object->ProgressMax;
long Value = object->GetProgressMax();
CHRESULT object->get_ProgressMax(long* Value);

Put

VB.NETobject.ProgressMax = Value As Integer
VBobject.ProgressMax = Value As Long
C#.NETint object.ProgressMax = Value;
VC++long object->ProgressMax = Value;
void object->PutProgressMax(long Value);
CHRESULT object->put_ProgressMax(long Value);

object

A SftTreeCell object.

Value

Defines the cell's background progress bar maximum value. Must be greater or equal to 0 (0 to turn off).

Comments

The ProgressMax property defines the cell's background progress bar maximum value (0 to turn off).

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 Cell.ProgressValue property defines the current value (between 0 and 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

        Dim ItemIndex As Integer

        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

VB6

    With SftTree1
        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

C#

        private void Form1_Load(object sender, System.EventArgs e) {
            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

C++

    m_vTree = m_Tree.GetControlUnknown();
    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

See Also SftTreeCell Object | Object Hierarchy


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