winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (139)
237if (!Edit.Focused) {
264if (!Edit.Visible || !Edit.Focused) {
267return (0 != (int)Edit.SendMessage(NativeMethods.EM_CANUNDO, 0, 0));
376return Edit.AccessibilityObject;
517if (edit==null || !Edit.Visible) {
521text = Edit.Text;
760toolTip = new GridToolTip(new Control[]{this, Edit});
934Edit.Filter = false;
950else if (Edit.Visible) {
951Edit.FocusInternal();
994if (Edit.Focused || DialogButton.Focused || DropDownButton.Focused) {
1007Edit.DontFocus = true;
1008if (Edit.Focused && !gotfocus) {
1011Edit.Visible = false;
1013Edit.SelectionStart = 0;
1014Edit.SelectionLength = 0;
1028Edit.DontFocus = false;
1185if (Edit.Focused) {
1186Edit.Copy();
1197if (Edit.Visible) {
1198Edit.Cut();
1205if (this.CanPaste && Edit.Visible) {
1206if (Edit.Focused) {
1207Edit.Paste();
1214Edit.FocusInternal();
1215Edit.Text = data;
1224if (this.CanUndo && Edit.Visible) {
1225Edit.SendMessage(NativeMethods.WM_UNDO, 0, 0);
1370if (errorState != ERROR_NONE && Edit.Visible) {
1371Edit.FocusInternal();
1386else if (Edit.Visible) {
1387Edit.FocusInternal();
1448if (Edit.Visible) {
1449Edit.FocusInternal();
1639Rectangle rectScreen = Screen.FromControl(Edit).WorkingArea;
1644if (rectScreen.Y + rectScreen.Height < (size.Height + loc.Y + Edit.Height)) {
1714Rectangle rectScreen = Screen.FromControl(Edit).WorkingArea;
1723if (rectScreen.Y + rectScreen.Height < (size.Height + loc.Y + Edit.Height)) {
1740Edit.Filter = true;
1779Edit.Text = gridEntry.GetPropertyTextValue();
1812if (Edit.Focused) {
1824if (!Edit.Visible) {
1860Edit.FilterKeyPress(keyChar);
1934if (Commit() && Edit.Focused) {
2287if (Edit.Focused) {
2425Edit.FocusInternal();
2510Edit.Text = gridEntry.GetPropertyTextValue(DropDownListBox.SelectedItem);
2511Edit.FocusInternal();
2617SetCommitError(ERROR_NONE, Edit.Focused);
2622if (!Edit.InSetText()) {
2632if (!Edit.Visible) {
2641if (Edit.Visible) {
2642Edit.HookMouseDown = true;
2656(Edit.AccessibilityObject as ControlAccessibleObject).NotifyClients(AccessibleEvents.Focus);
2659Edit.AccessibilityObject.SetFocus();
2756if (Edit.Focused || (errorState == ERROR_MSGBOX_UP) || (errorState == ERROR_THROWN)|| GetInPropertySet()) {
2780Edit.FocusInternal();
2796Edit.SelectAll();
2811Point screenPoint = Edit.PointToScreen(new Point(me.X, me.Y));
2816Edit.SendMessage(NativeMethods.WM_LBUTTONUP, 0, (int)(me.Y << 16 | (me.X & 0xFFFF)));
2817Edit.SelectAll();
2845if (sender == Edit && Edit.Focused) {
2849Edit.Text = originalTextValue;
2856Edit.Text = originalTextValue;
2878Edit.FocusInternal();
3097if (fControl && !fAlt && !fShift && Edit.Visible) {
3098Edit.FocusInternal();
3099Edit.SelectAll();
3268else if (!onLabel && gridItem.ValueToolTipLocation != InvalidPoint && !Edit.Focused) {
3333if (selectedGridEntry != null && selectedGridEntry.Enumerable && Edit.Focused && selectedGridEntry.IsValueEditable) {
3351Edit.FocusInternal();
3539Edit.Invalidate();
3633Edit.FocusInternal();
3642editPoint = Edit.PointToClientInternal(editPoint);
3643Edit.SendMessage(NativeMethods.WM_LBUTTONDOWN, 0, (int)(editPoint.Y << 16 | (editPoint.X & 0xFFFF)));
3644Edit.SendMessage(NativeMethods.WM_LBUTTONUP, 0, (int)(editPoint.Y << 16 | (editPoint.X & 0xFFFF)));
3923Edit.DisableMouseHook = true;
3935Edit.DisableMouseHook = false;
3997if (Edit.Focused) {
4015if (!forward && Edit.Visible) {
4016Edit.FocusInternal();
4268bool showEdit = Edit.Visible;
4272Edit.Visible = false;
4281Edit.Visible = showEdit;
4300Edit.SelectAll();
4447if ((GetFlag(FlagIsNewSelection) || !Edit.Focused) && (s != null && !s.Equals(Edit.Text))) {
4448Edit.Text = s;
4450Edit.SelectionStart = 0;
4451Edit.SelectionLength = 0;
4453Edit.AccessibleName = gridEntry.Label;
4459Edit.Font = GetBoldFont();
4462Edit.Font = Font;
4479Edit.Visible = false;
4485CommonEditorUse(Edit,rect);
4487Edit.ForeColor = drawReadOnly ? this.GrayTextColor : this.ForeColor;
4488Edit.BackColor = this.BackColor;
4489Edit.ReadOnly = drawReadOnly || !gridEntry.IsTextEditable;
4490Edit.UseSystemPasswordChar = gridEntry.ShouldRenderPassword;
4600Edit.HookMouseDown = capture;
4613if (selectedRow != -1 && row < selectedRow && Edit.Visible) {
4704success = CommitText(Edit.Text);
4709Edit.FocusInternal();
4739bool capture = Edit.HookMouseDown;
4765Edit.DisableMouseHook = true;
4769Edit.DisableMouseHook = false;
4770Edit.HookMouseDown = capture;
4786if (!String.Equals(text, Edit.Text)) {
4787Edit.Text = text;
4788Edit.SelectionStart = 0;
4789Edit.SelectionLength = 0;
4868else if (Edit.Visible) {
4869Edit.SelectAll();
4870Edit.FocusInternal();
4966bool hooked = Edit.HookMouseDown;
4967Edit.DisableMouseHook = true;
5022Edit.DisableMouseHook = false;
5032OnEscape(Edit);
5049bool hooked = Edit.HookMouseDown;
5050Edit.DisableMouseHook = true;
5100Edit.DisableMouseHook = false;
5108OnEscape(Edit);
5121if (Edit.Visible) {
5122Edit.FocusInternal();
5248Edit.Visible) {
5252else if (Edit.Focused && (DropDownButton.Visible || DialogButton.Visible)) {
5259if (Edit.Focused || DropDownButton.Focused || DialogButton.Focused) {
5336if (!GetInPropertySet() && Edit.Visible && (errorState != ERROR_NONE || !Commit())) {
5338Edit.FocusInternal();
5344Edit.FocusInternal();
5345Edit.Clear();
5346UnsafeNativeMethods.PostMessage(new HandleRef(Edit, Edit.Handle), NativeMethods.WM_IME_STARTCOMPOSITION, 0, 0);
5350Edit.FocusInternal();
5351UnsafeNativeMethods.PostMessage(new HandleRef(Edit, Edit.Handle), NativeMethods.WM_IME_COMPOSITION, m.WParam, m.LParam);
6472return _owningPropertyGridView.Edit.AccessibilityObject;