當前位置: 首頁>>代碼示例>>C#>>正文


C# ListBox.SuspendLayout方法代碼示例

本文整理匯總了C#中System.Windows.Forms.ListBox.SuspendLayout方法的典型用法代碼示例。如果您正苦於以下問題:C# ListBox.SuspendLayout方法的具體用法?C# ListBox.SuspendLayout怎麽用?C# ListBox.SuspendLayout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Windows.Forms.ListBox的用法示例。


在下文中一共展示了ListBox.SuspendLayout方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Process

        public static void Process(IChangeSet changes, ListBox listBox)
        {
            IDatabase adapter = new ListviewDatabaseAdapter(listBox);

            listBox.SuspendLayout();
            changes.Apply(adapter);
            listBox.ResumeLayout();
        }
開發者ID:automatak,項目名稱:dnp3-simulator,代碼行數:8,代碼來源:ListviewDatabaseAdapter.cs

示例2: CreateEditorControl

 public override Control CreateEditorControl()
 {
     ListBox listBox = new ListBox();
     listBox.SuspendLayout();
     listBox.Width = _defaultWidth;
     listBox.Height = _defaultHeight;
     listBox.ResumeLayout();
     listBox.SelectionMode = SelectionMode.One;
     listBox.SelectedIndexChanged += OnChange;
     listBox.IntegralHeight = false;
     return listBox;
 }
開發者ID:verebes,項目名稱:xml_form_editor,代碼行數:12,代碼來源:XMLList.cs

示例3: EditValue

 /// <summary>
 /// Edits a value based on some user input which is collected from a character control.
 /// </summary>
 /// <param name="context"></param>
 /// <param name="provider"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     _dialogProvider = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
     ListBox cmb = new ListBox();
     FontFamily[] fams = FontFamily.Families;
     cmb.SuspendLayout();
     foreach (FontFamily fam in fams)
     {
         cmb.Items.Add(fam.Name);
     }
     cmb.SelectedValueChanged += CmbSelectedValueChanged;
     cmb.ResumeLayout();
     if (_dialogProvider != null) _dialogProvider.DropDownControl(cmb);
     string test = (string)cmb.SelectedItem;
     return test;
 }
開發者ID:DIVEROVIEDO,項目名稱:DotSpatial,代碼行數:23,代碼來源:FontFamilyNameEditor.cs

示例4: PopulateListBox

		void	PopulateListBox( List< File > _files, ListBox _listBox, Label _label, Dictionary< string, ExtensionFilesGroup > _extensionGroup ) {
			_listBox.SuspendLayout();
			_listBox.Items.Clear();
			_listBox.Items.AddRange( _files.ToArray() );
			_listBox.ResumeLayout();

			// Build the extension group
			_extensionGroup.Clear();
			foreach ( File F in _files ) {
				if ( !_extensionGroup.ContainsKey( F.m_extension ) )
					_extensionGroup.Add( F.m_extension, new ExtensionFilesGroup( F.m_extension ) );
				ExtensionFilesGroup	group = _extensionGroup[F.m_extension];
				group.AddFile( F );
			}

			_label.Text = _files.Count + " files. " + _extensionGroup.Keys.Count + " extensions.";
		}
開發者ID:Patapom,項目名稱:GodComplex,代碼行數:17,代碼來源:Form1.cs


注:本文中的System.Windows.Forms.ListBox.SuspendLayout方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。