IBreadcrumb.BeginUpdate

Fore Syntax

BeginUpdate;

Fore.NET Syntax

BeginUpdate();

Description

The BeginUpdate method disables rerendering of linked components.

Comments

The method is relevant if it is called from the  MetaAttributesBreadcrumb  child component linked to the component  MetaAttributesTreeList. Calling the method allows to avoid blinking of the component MetaAttributesTreeList  changing the properties of the component  MetaAttributesBreadcrumb.

To resume rerendering, use the EndUpdate method.

NOTE. The state of the component component is saved at the method runtime.

Fore Example

Executing the example requires a form containing the MetaAttributesTreeList component named MetaAttributesTreeList1 and the MetaAttributesBreadcrumb component named MetaAttributesBreadcrumb1. Components must be set to work with the same dictionary. Before executing the example two or more dictionary attributes must be selected in the MetaAttributesBreadcrumb1 component. The form should also contain the Button1 button.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Items: IBreadcrumbItems;
Begin
    MetaAttributesBreadcrumb1.BeginUpdate;
    Items := MetaAttributesBreadcrumb1.Items;
    Items.Move(01);
    MetaAttributesBreadcrumb1.EndUpdate;
End Sub Button1OnClick;

Clicking the button moves the first element in the MetaAttributesBreadcrumb1 component to the second position. Rerendering of the MetaAttributesTreeList1 component will pause during the swapping.

Fore.NET Example

Executing the example requires a form containing the MetaAttributesTreeListNet component named MetaAttributesTreeListNet1 and the MetaAttributesBreadcrumbNet component named MetaAttributesBreadcrumbNet1. Components must be set to work with the same dictionary. Before executing the example two or more dictionary attributes must be selected in the metaAttributesBreadcrumbNet1 component. The form should also contain the Button1 button.

Imports Prognoz.Platform.Interop.Forms;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Items: IBreadcrumbItems;
Begin
    metaAttributesBreadcrumbNet1.CtrlBox.BeginUpdate();
    Items := metaAttributesBreadcrumbNet1.CtrlBox.Items;
    Items.Move(01);
    metaAttributesBreadcrumbNet1.CtrlBox.EndUpdate();
End Sub;

Clicking the button moves the first element in the MetaAttributesBreadcrumbNet1 component to the second position. Rerendering of the MetaAttributesTreeListNet1 component will pause during the swapping.

See also:

IBreadcrumb