Spread Windows Forms 17
GrapeCity.Win.PluginInputMan Assembly / GrapeCity.Win.Spread.InputMan.CellType Namespace / GcComboBox Class / BeginUpdate Method


In This Topic
    BeginUpdate Method (GcComboBox)
    In This Topic
    Maintains performance when items are added to the GcComboBox one at a time.
    Syntax
    'Declaration
     
    
    Public Sub BeginUpdate() 
    'Usage
     
    
    Dim instance As GcComboBox
     
    instance.BeginUpdate()
    public void BeginUpdate()
    Remarks
    This method prevents the control from painting until the EndUpdate method is called. The preferred way to add items to the GcComboBox is to use the AddRange method of the ListItemCollection class (through the Items property of the GcComboBox). This enables you to add an array of items to the list at one time. However, if you want to add items one at a time using the Add method of the ListItemCollection class, you can use the BeginUpdate method to prevent the control from repainting the GcComboBox each time an item is added to the list. Once you have completed the task of adding items to the list, call the EndUpdate method to enable the GcComboBox to repaint. This way of adding items can prevent flicker during the drawing of the GcComboBox when a large number of items are being added to the list.
    See Also