System.Windows.Forms.ComboBox.BeginUpdate()

Here are the examples of the csharp api class System.Windows.Forms.ComboBox.BeginUpdate() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

14 Examples 7

1. Example

Project: Krypton
Source File: KryptonComboBox.cs
View license
public void BeginUpdate()
        {
            _comboBox.BeginUpdate();
        }

2. Example

Project: chummer5a
Source File: Commlink.cs
View license
public void RefreshCommlinkCBOs(ComboBox cboAttack, ComboBox cboSleaze, ComboBox cboDP, ComboBox cbo/n ..... /n //View Source file for more details /n }

3. Example

View license
public static void LoadItems(this ComboBox cmb, Object[] items)
        {
            cmb.BeginUpdate();
            cmb.Items.Clear();

            cmb.Items.AddRange(items);

            cmb.EndUpdate();
        }

4. Example

Project: fomm
Source File: DropDownTabControl.cs
View license
protected void UpdateSelector()
    {
      TabSelector.BeginUpdate();
      TabSelector.Items.Clear();
      foreach (var ddpPage in TabPages)
      {
        InsertTabPageInSelector(ddpPage);
      }
      TabSelector.SelectedItem = SelectedTabPage;
      TabSelector.EndUpdate();
    }

5. Example

View license
protected void UpdateSelector()
		{
			m_cbxSelector.BeginUpdate();
			m_cbxSelector.Items.Clear();
			foreach (DropDownTabPage ddpPage in m_tpcPages)
				InsertTabPageInSelector(ddpPage);
			m_cbxSelector.SelectedItem = SelectedTabPage;
			m_cbxSelector.EndUpdate();
		}

6. Example

Project: NFirmwareEditor
Source File: Extensions.cs
View license
public static void Fill(this ComboBox comboBox, object[] items)
		{
			comboBox.BeginUpdate();
			comboBox.Items.Clear();
			comboBox.Items.AddRange(items);
			comboBox.EndUpdate();
		}

7. Example

Project: PHPManager
Source File: ChangeVersionDialog.cs
View license
private void OnGetVersionsDoWorkCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            _versionComboBox.BeginUpdate();
            _versionComboBox.SuspendLayout();

            try
            {
                RemoteObjectCollection<PHPVersion> phpVersions = e.Result as RemoteObjectCollection<PHPVersion>;
                foreach (PHPVersion phpVersion in phpVersions)
                {
                    phpVersion.Version = String.Format("{0} ({1})", phpVersion.Version, phpVersion.ScriptProcessor);
                    _versionComboBox.Items.Add(phpVersion);
                }
                _versionComboBox.DisplayMember = "Version";
                _versionComboBox.SelectedIndex = 0;
                if (_versionComboBox.Items.Count > 0)
                {
                    UpdateTaskForm();
                }
            }
            catch (Exception ex)
            {
                DisplayErrorMessage(ex, Resources.ResourceManager);
            }
            finally
            {
                _versionComboBox.ResumeLayout();
                _versionComboBox.EndUpdate();
            }
        }

8. Example

Project: xenadmin
Source File: CPUMemoryEditPage.cs
View license
private void PopulateVCPUComboBox(ComboBox comboBox, long min, long max, long currentValue, Predicate<long> isValid)
        {
            comboBox.BeginUpdate();
            comboBox.Items.Clear();
            for (long i = min; i <= max; ++i)
            {
                if (i == currentValue || isValid(i))
                    comboBox.Items.Add(i);
            }
            if (currentValue > max)
                comboBox.Items.Add(currentValue);
            comboBox.SelectedItem = currentValue;
            comboBox.EndUpdate();
        }

9. Example

Project: xenadmin
Source File: Page_CpuMem.cs
View license
private void PopulateVCPUComboBox(ComboBox comboBox, long min, long max, long currentValue, Predicate<long> isValid)
        {
            comboBox.BeginUpdate();
            comboBox.Items.Clear();
            for (long i = min; i <= max; ++i)
            {
                if (i == currentValue || isValid(i))
                    comboBox.Items.Add(i);
            }
            if (currentValue > max)
                comboBox.Items.Add(currentValue);
            comboBox.SelectedItem = currentValue;
            comboBox.EndUpdate();
        }

10. Example

View license
private void RetrieveAttributesInternal(ComboBox cmbEntities, ComboBox cmbAttributes, bool limitToLo/n ..... /n //View Source file for more details /n }

11. Example

View license
private void OnUrlsWorkerDoWorkCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            _urlsComboBox.BeginUpdate();
            _urlsComboBox.SuspendLayout();

            try
            {
                _urlsComboBox.Items.Clear();

                List<string> domains = e.Result as List<string>;
                foreach (string domain in domains)
                {
                    _urlsComboBox.Items.Add(domain);
                }

                _urlsComboBox.SelectedIndex = 0;
                if (!String.IsNullOrEmpty(_preferenceUrl))
                {
                    int selectedIndex = _urlsComboBox.Items.IndexOf(_preferenceUrl);
                    if (selectedIndex > 0)
                    {
                        _urlsComboBox.SelectedIndex = selectedIndex;
                    }
                }
            }
            catch (Exception ex)
            {
                DisplayErrorMessage(ex, Resources.ResourceManager);
            }
            finally
            {
                _urlsComboBox.ResumeLayout();
                _urlsComboBox.EndUpdate();
            }

            _urlsComboBox.Focus();
        }

12. Example

Project: subtitleedit
Source File: UiUtil.cs
View license
public static void InitializeSubtitleFormatComboBox(ComboBox comboBox, IEnumerable<string> formatNames, string selectedName)
        {
            var selectedIndex = 0;
            comboBox.BeginUpdate();
            comboBox.Items.Clear();
            using (var graphics = comboBox.CreateGraphics())
            {
                var maxWidth = 0.0F;
                foreach (var name in formatNames)
                {
                    var index = comboBox.Items.Add(name);
                    if (name.Equals(selectedName, StringComparison.OrdinalIgnoreCase))
                        selectedIndex = index;
                    var width = graphics.MeasureString(name, comboBox.Font).Width;
                    if (width > maxWidth)
                        maxWidth = width;
                }
                comboBox.DropDownWidth = (int)Math.Round(maxWidth + 7.5);
            }
            comboBox.SelectedIndex = selectedIndex;
            comboBox.EndUpdate();
        }

13. Example

Project: subtitleedit
Source File: UiUtil.cs
View license
public static void InitializeTextEncodingComboBox(ComboBox comboBox)
        {
            var defau/n ..... /n //View Source file for more details /n }

14. Example

View license
private void OnSiteWorkerDoWorkCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            _sitesComboBox.BeginUpdate();
            _sitesComboBox.SuspendLayout();
            
            try
            {
                _sitesComboBox.Items.Clear();

                ArrayList sites = e.Result as ArrayList;
                sites.Sort();
                foreach (string siteName in sites)
                {
                    _sitesComboBox.Items.Add(siteName);
                }

                if (!String.IsNullOrEmpty(_preferenceSite))
                {
                    int selectedIndex = _sitesComboBox.Items.IndexOf(_preferenceSite);
                    if (selectedIndex >= 0)
                    {
                        _sitesComboBox.SelectedIndex = selectedIndex;
                    }
                }
            }
            catch (Exception ex)
            {
                DisplayErrorMessage(ex, Resources.ResourceManager);
            }
            finally
            {
                _sitesComboBox.ResumeLayout();
                _sitesComboBox.EndUpdate();
            }

            _sitesComboBox.Focus();
        }