SftTree/OCX 7.5 - ActiveX Tree Control


BulkUpdate Property, SftTree Object

Defines bulk update mode.



VB.NETBoolean = object.BulkUpdate As Boolean
VBBoolean = object.BulkUpdate As Boolean
C#.NETbool Boolean = object.BulkUpdate;
VC++VARIANT_BOOL Boolean = object->BulkUpdate;
VARIANT_BOOL Boolean = object->GetBulkUpdate();
CHRESULT object->get_BulkUpdate(VARIANT_BOOL* Boolean);


VB.NETobject.BulkUpdate = Boolean As Boolean
VBobject.BulkUpdate = Boolean As Boolean
C#.NETbool object.BulkUpdate = Boolean;
VC++VARIANT_BOOL object->BulkUpdate = Boolean;
void object->PutBulkUpdate(VARIANT_BOOL Boolean);
CHRESULT object->put_BulkUpdate(VARIANT_BOOL Boolean);


A SftTree object.


Defines bulk update mode.

TrueA mass-update is in progress.
FalseA mass-update is not in progress.


The BulkUpdate property defines bulk update mode.

The BulkUpdate property should be used when many items are added to a tree control or other lengthy operations are performed. By setting the property to True, the tree control can skip certain internal processing. Once updates are completed, the property has to be set to False. When adding, inserting or deleting items and when changing the Item.Level property, the tree control may have to do an extensive scan of parent items to determine if the current (visual) presentation has to be changed. This processing can be skipped when the BulkUpdate property is set to True, considerably speeding up the process.

After updating the tree control, the BulkUpdate property must be set to False. If the property remains set to True, the tree control will no longer redraw itself properly.

The BulkUpdate property is automatically reset to False whenever the control's Refresh method is used and when the Font, Headers.Font or RowHeaders.Font properties are changed.

This property is not available at design-time.



    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        AxSftTree1.BulkUpdate = True

        ' set default item graphic.  This can also be done at design time
        AxSftTree1.Items.ItemImageExpandable.SetImageListH(ItemImageList.Handle.ToInt64(), 0)
        AxSftTree1.Items.ItemImageExpanded.SetImageListH(ItemImageList.Handle.ToInt64(), 1)
        AxSftTree1.Items.ItemImageLeaf.SetImageListH(ItemImageList.Handle.ToInt64(), 2)

        ' set the column header sort indicators
        AxSftTree1.Headers.SortIndicators = SftTreeHeaderSortIndicatorsConstants.headerSortIndicatorsSftTreeAuto
        AxSftTree1.get_Header(0).SortIndicator = SftTreeSortIndicatorConstants.sortIndicatorSftTreeAscending


    Dim Bk As Integer, Ch As Integer, Sect As Integer, ItemIndex As Integer
    Dim BookIndex As Integer
    Dim size As Integer
    Dim CellFont As New StdFont

    With SftTree1
        ' Mass-Update
        .BulkUpdate = True
        ' set default item graphic.  This can also be done at design time
        Set .Items.ItemImageExpandable.Picture = BookClosed.Picture
        Set .Items.ItemImageExpanded.Picture = BookOpen.Picture
        Set .Items.ItemImageLeaf.Picture = Topic.Picture
        ' set the column header sort indicators
        SftTree1.Headers.SortIndicators = headerSortIndicatorsSftTreeAuto
        SftTree1.Header(0).SortIndicator = sortIndicatorSftTreeAscending


        private void button1_Click(object sender, System.EventArgs e) {

        private void Form1_Load(object sender, System.EventArgs e) {

            axSftTree1.BulkUpdate = true;

            // set default item graphic.  This can also be done at design time
            axSftTree1.Items.ItemImageExpandable.SetImageListH((long)itemImageList.Handle, 0);
            axSftTree1.Items.ItemImageExpanded.SetImageListH((long)itemImageList.Handle, 1);
            axSftTree1.Items.ItemImageLeaf.SetImageListH((long)itemImageList.Handle, 2);

            // set the column header sort indicators
            axSftTree1.Headers.SortIndicators = SftTreeHeaderSortIndicatorsConstants.headerSortIndicatorsSftTreeAuto;
            axSftTree1.get_Header(0).SortIndicator = SftTreeSortIndicatorConstants.sortIndicatorSftTreeAscending;


                this, 123, NULL, FALSE, NULL);
    m_vTree = pTree->GetControlUnknown();
    ASSERT(m_vTree != NULL);

    // random numbers

    m_vTree->BulkUpdate = VARIANT_TRUE; // Mass update

    // set default item graphic.  This can also be done at design time

    // set the column header sort indicators

See Also SftTree Object | Object Hierarchy

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