private void SetEditorValue(object value) { RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement; editorElement.Value = value == null || string.IsNullOrEmpty(value.ToString()) ? string.Empty : value.ToString(); this.originalValue = (object)editorElement.Value; }
protected override void OnKeyUp(KeyEventArgs e) { RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement; if (editorElement == null || !editorElement.IsInValidState(true)) { return; } int length = editorElement.Text.Length; switch (e.KeyCode) { case Keys.Left: if (this.selectionLength != 0 || (this.RightToLeft || this.selectionStart != 0) && (!this.RightToLeft || this.selectionStart != length)) { break; } this.ProcessKeyDown(e); break; case Keys.Right: if (this.selectionLength != 0 || (this.RightToLeft || this.selectionStart != length) && (!this.RightToLeft || this.selectionStart != 0)) { break; } this.ProcessKeyDown(e); break; } }
protected override void OnKeyDown(KeyEventArgs e) { RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement; PropertyGridItemElement ownerElement = this.OwnerElement as PropertyGridItemElement; if (ownerElement == null) { return; } switch (e.KeyCode) { case Keys.Return: if (!this.Validate()) { break; } ownerElement.PropertyTableElement.EndEdit(); break; case Keys.Escape: ownerElement.Data.PropertyGridTableElement.CancelEdit(); break; case Keys.Delete: if (editorElement.TextBoxItem.SelectionLength != editorElement.TextBoxItem.TextLength) { break; } editorElement.Text = string.Empty; break; } }
protected virtual RadBrowseEditorElement CreateEditorElement() { RadBrowseEditorElement browseEditorElement = new RadBrowseEditorElement(); int num = (int)browseEditorElement.SetDefaultValueOverride(RadElement.StretchVerticallyProperty, (object)true); return(browseEditorElement); }
protected override void CreateChildItems(RadElement parent) { base.CreateChildItems(parent); this.browseElement = this.CreateEditorElement(); parent.Children.Add((RadElement)this.browseElement); this.WireEvents(); }
public override void BeginEdit() { base.BeginEdit(); RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement; editorElement.ValueChanging += new ValueChangingEventHandler(this.editorElement_ValueChanging); editorElement.ValueChanged += new EventHandler(this.editorElement_ValueChanged); editorElement.DialogClosed += new DialogClosedEventHandler(this.editorElement_DialogClosed); editorElement.KeyUp += new KeyEventHandler(this.editorElement_KeyUp); editorElement.KeyDown += new KeyEventHandler(this.editorElement_KeyDown); }
public override bool EndEdit() { base.EndEdit(); RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement; editorElement.ValueChanging -= new ValueChangingEventHandler(this.editorElement_ValueChanging); editorElement.ValueChanged -= new EventHandler(this.editorElement_ValueChanged); editorElement.KeyDown -= new KeyEventHandler(this.editorElement_KeyDown); editorElement.KeyUp -= new KeyEventHandler(this.editorElement_KeyUp); editorElement.TextBoxItem.HostedControl.LostFocus -= new EventHandler(this.HostedControl_LostFocus); return(true); }
public override bool EndEdit() { base.EndEdit(); RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement; editorElement.ValueChanging -= new ValueChangingEventHandler(this.editorElement_ValueChanging); editorElement.ValueChanged -= new EventHandler(this.editorElement_ValueChanged); editorElement.DialogClosed -= new DialogClosedEventHandler(this.editorElement_DialogClosed); editorElement.KeyUp -= new KeyEventHandler(this.editorElement_KeyUp); editorElement.KeyDown -= new KeyEventHandler(this.editorElement_KeyDown); return(true); }
public override void BeginEdit() { base.BeginEdit(); RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement; editorElement.ValueChanging += new ValueChangingEventHandler(this.editorElement_ValueChanging); editorElement.ValueChanged += new EventHandler(this.editorElement_ValueChanged); editorElement.KeyDown += new KeyEventHandler(this.editorElement_KeyDown); editorElement.KeyUp += new KeyEventHandler(this.editorElement_KeyUp); editorElement.TextBoxItem.SelectAll(); editorElement.TextBoxItem.TextBoxControl.Focus(); editorElement.RightToLeft = this.RightToLeft; editorElement.TextBoxItem.HostedControl.LostFocus += new EventHandler(this.HostedControl_LostFocus); }
protected override void OnKeyDown(KeyEventArgs e) { RadBrowseEditorElement editorElement = this.EditorElement as RadBrowseEditorElement; if (editorElement == null || !editorElement.IsInValidState(true)) { return; } this.selectionStart = editorElement.TextBoxItem.SelectionStart; this.selectionLength = editorElement.TextBoxItem.SelectionLength; if (e.KeyCode == Keys.Return && e.Modifiers != Keys.Control) { this.ProcessKeyDown(e); } else { if (e.KeyCode != Keys.Escape) { return; } this.ProcessKeyDown(e); e.Handled = true; } }