Export (0) Print
Expand All

ToolStripComboBox.BeginUpdate Method

Maintains performance when items are added to the ToolStripComboBox one at a time.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public void BeginUpdate()

This method prevents the control from painting until the EndUpdate method is called.

The preferred way to add items to the ToolStripComboBox is to use the AddRange method through the Items property of the ToolStripComboBox. 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, you can use the BeginUpdate method to prevent the control from repainting the ToolStripComboBox 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 ToolStripComboBox to repaint. This way of adding items can prevent flicker during the drawing of the ToolStripComboBox when a large number of items are being added to the list.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft