Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

BulkUpdate Property, SftTree Object

Defines bulk update mode.

Syntax

Get

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);

Put

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);

object

A SftTree object.

Boolean

Defines bulk update mode.

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

Comments

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.

Examples

VB.NET

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Application.Exit()
    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

VB6

    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

    Randomize
    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

C#

        private void button1_Click(object sender, System.EventArgs e) {
            Application.Exit();
        }

        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;

C++

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

    // random numbers
    srand(0);

    m_vTree->BulkUpdate = VARIANT_TRUE; // Mass update

    // set default item graphic.  This can also be done at design time
    m_vTree->Items->ItemImageExpandable->PutBitmapHandle((OLE_HANDLE)(HBITMAP)m_BookClosed);
    m_vTree->Items->ItemImageExpanded->PutBitmapHandle((OLE_HANDLE)(HBITMAP)m_BookOpen);
    m_vTree->Items->ItemImageLeaf->PutBitmapHandle((OLE_HANDLE)(HBITMAP)m_Topic);

    // set the column header sort indicators

See Also SftTree Object | Object Hierarchy


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