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)
3133if (_selectedGridEntry is not null && _selectedGridEntry.Enumerable && EditTextBox.Focused && _selectedGridEntry.IsValueEditable)
3156EditTextBox.Focus();
3331EditTextBox.Invalidate();
3430EditTextBox.Focus();
3438editPoint = EditTextBox.PointToClient(editPoint);
3439PInvokeCore.SendMessage(EditTextBox, PInvokeCore.WM_LBUTTONDOWN, 0, PARAM.FromPoint(editPoint));
3440PInvokeCore.SendMessage(EditTextBox, PInvokeCore.WM_LBUTTONUP, (WPARAM)0, (LPARAM)editPoint);
3750EditTextBox.DisableMouseHook = true;
3765EditTextBox.DisableMouseHook = false;
3860if (EditTextBox.Focused)
3883if (!forward && EditTextBox.Visible)
3885EditTextBox.Focus();
4160bool editVisible = EditTextBox.Visible;
4164EditTextBox.Visible = false;
4175EditTextBox.Visible = editVisible;
4346if ((_flags.HasFlag(Flags.IsNewSelection) || !EditTextBox.Focused) && s is not null && !s.Equals(EditTextBox.Text))
4348EditTextBox.Text = s;
4350EditTextBox.SelectionStart = 0;
4351EditTextBox.SelectionLength = 0;
4354EditTextBox.AccessibleName = gridEntry.Label;
4358EditTextBox.Font = GetBoldFont();
4362EditTextBox.Font = Font;
4367EditTextBox.Visible = false;
4374CommonEditorUse(EditTextBox, rect);
4376EditTextBox.ForeColor = drawReadOnly ? GrayTextColor : ForeColor;
4377EditTextBox.BackColor = BackColor;
4378EditTextBox.ReadOnly = drawReadOnly || !gridEntry.IsTextEditable;
4379EditTextBox.UseSystemPasswordChar = gridEntry.ShouldRenderPassword;
4464EditTextBox.HookMouseDown = capture;
4478if (_selectedRow != -1 && row < _selectedRow && EditTextBox.Visible)
4559/// Commits any needed changes in the <see cref="EditTextBox" />. Returns false if there is a change that
4588success = CommitText(EditTextBox.Text);
4594EditTextBox.Focus();
4595EditTextBox.SelectAll();
4627bool capture = EditTextBox.HookMouseDown;
4656EditTextBox.DisableMouseHook = true;
4661EditTextBox.DisableMouseHook = false;
4662EditTextBox.HookMouseDown = capture;
4680if (!string.Equals(text, EditTextBox.Text))
4682EditTextBox.Text = text;
4683EditTextBox.SelectionStart = 0;
4684EditTextBox.SelectionLength = 0;
4788else if (EditTextBox.Visible)
4790EditTextBox.SelectAll();
4791EditTextBox.Focus();
4893bool hooked = EditTextBox.HookMouseDown;
4894EditTextBox.DisableMouseHook = true;
4947EditTextBox.DisableMouseHook = false;
4958OnEscape(EditTextBox);
4965bool hooked = EditTextBox.HookMouseDown;
4966EditTextBox.DisableMouseHook = true;
5020EditTextBox.DisableMouseHook = false;
5031OnEscape(EditTextBox);
5045if (EditTextBox.Visible)
5047EditTextBox.Focus();
5048EditTextBox.SelectAll();
5207if (DropDownButton.Visible || DialogButton.Visible || EditTextBox.Visible)
5212else if (EditTextBox.Focused && (DropDownButton.Visible || DialogButton.Visible))
5222if (EditTextBox.Focused || DropDownButton.Focused || DialogButton.Focused)
5308if (!InPropertySet && EditTextBox.Visible && (_errorState != ErrorState.None || !CommitEditTextBox()))
5311EditTextBox.Focus();
5318EditTextBox.Focus();
5319EditTextBox.Clear();
5320PInvokeCore.PostMessage(EditTextBox, PInvokeCore.WM_IME_STARTCOMPOSITION);
5324EditTextBox.Focus();
5325PInvokeCore.PostMessage(EditTextBox, PInvokeCore.WM_IME_COMPOSITION, m.WParamInternal, m.LParamInternal);