System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (143)
159&& (EditTextBox.Focused || !string.IsNullOrEmpty(_selectedGridEntry.GetPropertyTextValue()));
175if (!EditTextBox.Visible || !EditTextBox.Focused)
180return PInvokeCore.SendMessage(EditTextBox, PInvokeCore.EM_CANUNDO) != 0;
304internal AccessibleObject EditAccessibleObject => EditTextBox.AccessibilityObject;
404/// Returns 'true' if the <see cref="EditTextBox" /> has a change that needs committed.
412if (_editTextBox is null || !EditTextBox.Visible)
417text = EditTextBox.Text;
573_toolTip = new GridToolTip([this, EditTextBox])
761EditTextBox.Filter = false;
778else if (EditTextBox.Visible)
780EditTextBox.Focus();
823if (EditTextBox.Focused || DialogButton.Focused || DropDownButton.Focused)
838EditTextBox.HideFocusState = true;
839if (EditTextBox.Focused && !gotFocus)
844EditTextBox.Visible = false;
846EditTextBox.SelectionStart = 0;
847EditTextBox.SelectionLength = 0;
866EditTextBox.HideFocusState = false;
1009if (EditTextBox.Focused)
1011EditTextBox.Copy();
1025if (EditTextBox.Visible)
1027EditTextBox.Cut();
1034if (!CanPaste || !EditTextBox.Visible)
1039if (EditTextBox.Focused)
1041EditTextBox.Paste();
1051EditTextBox.Focus();
1052EditTextBox.Text = data;
1061if (CanUndo && EditTextBox.Visible)
1063PInvokeCore.SendMessage(EditTextBox, PInvokeCore.WM_UNDO);
1204if (_errorState != ErrorState.None && EditTextBox.Visible)
1206EditTextBox.Focus();
1225else if (EditTextBox.Visible)
1228EditTextBox.Focus();
1229EditTextBox.SelectAll();
1294if (EditTextBox.Visible)
1296EditTextBox.Focus();
1297EditTextBox.SelectAll();
1420Rectangle rectScreen = Screen.FromControl(EditTextBox).WorkingArea;
1428if (rectScreen.Y + rectScreen.Height < (size.Height + location.Y + EditTextBox.Height))
1456EditTextBox.Filter = true;
1459EditTextBox.SelectAll();
1484EditTextBox.Text = gridEntry?.GetPropertyTextValue();
1526if (EditTextBox.Focused)
1528EditTextBox.SelectAll();
1541if (!EditTextBox.Visible)
1579EditTextBox.FilterKeyPress(keyChar);
2032if (EditTextBox.Focused)
2185EditTextBox.Focus();
2243EditTextBox.Text = gridEntry?.GetPropertyTextValue(DropDownListBox.SelectedItem);
2244EditTextBox.Focus();
2245EditTextBox.SelectAll();
2379SetCommitError(ErrorState.None, EditTextBox.Focused);
2387if (!EditTextBox.Visible)
2398if (EditTextBox.Visible)
2400EditTextBox.HookMouseDown = true;
2418if (EditTextBox.IsAccessibilityObjectCreated)
2420((ControlAccessibleObject)EditTextBox.AccessibilityObject).NotifyClients(AccessibleEvents.Focus);
2421EditTextBox.AccessibilityObject.SetFocus();
2478EditTextBox?.SelectAll();
2529if (EditTextBox.Focused || (_errorState == ErrorState.MessageBoxUp) || (_errorState == ErrorState.Thrown) || InPropertySet)
2560EditTextBox.Focus();
2578EditTextBox.SelectAll();
2593Point screenPoint = EditTextBox.PointToScreen(e.Location);
2599PInvokeCore.SendMessage(EditTextBox, PInvokeCore.WM_LBUTTONUP, (WPARAM)0, (LPARAM)e.Location);
2600EditTextBox.SelectAll();
2618if (sender != EditTextBox || !EditTextBox.Focused)
2632EditTextBox.Text = _originalTextValue;
2640EditTextBox.Text = _originalTextValue;
2667EditTextBox.Focus();
2668EditTextBox.SelectAll();
2903if (controlPressed && !altPressed && !shiftPressed && EditTextBox.Visible)
2905EditTextBox.Focus();
2906EditTextBox.SelectAll();
3061else if (!onLabel && gridItem.ValueToolTipLocation != InvalidPoint && !EditTextBox.Focused)
3134if (_selectedGridEntry is not null && _selectedGridEntry.Enumerable && EditTextBox.Focused && _selectedGridEntry.IsValueEditable)
3157EditTextBox.Focus();
3332EditTextBox.Invalidate();
3431EditTextBox.Focus();
3439editPoint = EditTextBox.PointToClient(editPoint);
3440PInvokeCore.SendMessage(EditTextBox, PInvokeCore.WM_LBUTTONDOWN, 0, PARAM.FromPoint(editPoint));
3441PInvokeCore.SendMessage(EditTextBox, PInvokeCore.WM_LBUTTONUP, (WPARAM)0, (LPARAM)editPoint);
3751EditTextBox.DisableMouseHook = true;
3766EditTextBox.DisableMouseHook = false;
3861if (EditTextBox.Focused)
3884if (!forward && EditTextBox.Visible)
3886EditTextBox.Focus();
4161bool editVisible = EditTextBox.Visible;
4165EditTextBox.Visible = false;
4176EditTextBox.Visible = editVisible;
4347if ((_flags.HasFlag(Flags.IsNewSelection) || !EditTextBox.Focused) && s is not null && !s.Equals(EditTextBox.Text))
4349EditTextBox.Text = s;
4351EditTextBox.SelectionStart = 0;
4352EditTextBox.SelectionLength = 0;
4355EditTextBox.AccessibleName = gridEntry.Label;
4359EditTextBox.Font = GetBoldFont();
4363EditTextBox.Font = Font;
4368EditTextBox.Visible = false;
4375CommonEditorUse(EditTextBox, rect);
4377EditTextBox.ForeColor = drawReadOnly ? GrayTextColor : ForeColor;
4378EditTextBox.BackColor = BackColor;
4379EditTextBox.ReadOnly = drawReadOnly || !gridEntry.IsTextEditable;
4380EditTextBox.UseSystemPasswordChar = gridEntry.ShouldRenderPassword;
4465EditTextBox.HookMouseDown = capture;
4479if (_selectedRow != -1 && row < _selectedRow && EditTextBox.Visible)
4560/// Commits any needed changes in the <see cref="EditTextBox" />. Returns false if there is a change that
4589success = CommitText(EditTextBox.Text);
4595EditTextBox.Focus();
4596EditTextBox.SelectAll();
4628bool capture = EditTextBox.HookMouseDown;
4657EditTextBox.DisableMouseHook = true;
4662EditTextBox.DisableMouseHook = false;
4663EditTextBox.HookMouseDown = capture;
4681if (!string.Equals(text, EditTextBox.Text))
4683EditTextBox.Text = text;
4684EditTextBox.SelectionStart = 0;
4685EditTextBox.SelectionLength = 0;
4789else if (EditTextBox.Visible)
4791EditTextBox.SelectAll();
4792EditTextBox.Focus();
4896bool hooked = EditTextBox.HookMouseDown;
4897EditTextBox.DisableMouseHook = true;
4950EditTextBox.DisableMouseHook = false;
4961OnEscape(EditTextBox);
4970bool hooked = EditTextBox.HookMouseDown;
4971EditTextBox.DisableMouseHook = true;
5025EditTextBox.DisableMouseHook = false;
5036OnEscape(EditTextBox);
5050if (EditTextBox.Visible)
5052EditTextBox.Focus();
5053EditTextBox.SelectAll();
5212if (DropDownButton.Visible || DialogButton.Visible || EditTextBox.Visible)
5217else if (EditTextBox.Focused && (DropDownButton.Visible || DialogButton.Visible))
5227if (EditTextBox.Focused || DropDownButton.Focused || DialogButton.Focused)
5313if (!InPropertySet && EditTextBox.Visible && (_errorState != ErrorState.None || !CommitEditTextBox()))
5316EditTextBox.Focus();
5323EditTextBox.Focus();
5324EditTextBox.Clear();
5325PInvokeCore.PostMessage(EditTextBox, PInvokeCore.WM_IME_STARTCOMPOSITION);
5329EditTextBox.Focus();
5330PInvokeCore.PostMessage(EditTextBox, PInvokeCore.WM_IME_COMPOSITION, m.WParamInternal, m.LParamInternal);