System.Windows.Forms.Control.Select C# (CSharp) Method

Select() protected method

protected Select ( bool directed, bool forward ) : void
directed bool
forward bool
return void
		protected virtual void Select(bool directed, bool forward) {
			IContainerControl	container;
			
			container = GetContainerControl();
			if (container != null && (Control)container != this)
				container.ActiveControl = this;
		}

Same methods

Control::Select ( Control control ) : bool
Control::Select ( ) : void

Usage Example

Example #1
0
        private void EditItem(int index, ListViewItem.ListViewSubItem sb)
        {
            if (this.SelectedItems.Count <= 0)
            {
                return;
            }
            int currentSelectColumnIndex = _mCtrls.IndexOfKey(index);

            if (currentSelectColumnIndex == -1)
            {
                return;
            }
            _currentCtrl = (System.Windows.Forms.Control)_mCtrls.Values[currentSelectColumnIndex];
            ListViewItem item  = this.SelectedItems[0];
            Rectangle    rect  = sb.Bounds;
            Rectangle    _rect = new Rectangle(rect.Right - this.Columns[index].Width, rect.Top, this.Columns[index].Width, rect.Height);

            _currentCtrl.Bounds = _rect;
            _currentCtrl.BringToFront();
            _currentCtrl.Text         = item.SubItems[index].Text;
            _currentCtrl.TextChanged += CtrTextChanged;
            _currentCtrl.Leave       += CtrLeave;

            _currentCtrl.Visible = true;
            _currentCtrl.Tag     = item;
            _currentCtrl.Select();
        }
All Usage Examples Of System.Windows.Forms.Control::Select
Control