To reproduce: Place a MaskedTextBox on a Form Set 'MaskType' to 'Numeric' (and in my case I have Mask set to 'D' to allow integer values only) Run the application / open the form - by default the masked textbox has a value of '0' Elsewhere (i.e. notepad) enter and copy a text like 'CT_1234' into the clipboard (please note the starting non-numeric string characters) Go back to the application / form and click into the masked text box Select the pre-existing value (by default the '0' mentioned above or any other value i.e. '11111' .. and by select I mean via mouse or [Shift]+[Arrow Key Left/Right]) Press [Ctrl+V] >> Nothing happens .. what should happen though is that the selected text is overridden with '1234' However, if you have no text selected in the masked text box and place the cursor in it i.e. at the very beginning or end of the existing value, pasting works as expected.. the value '1234' is added (and correctly 'dropping the 'CT_' in front of it).
To reproduce: - Set the value to February 29. - Open the drop down and zoom 3 times. Workaround: private void Calendar_ZoomChanging(object sender, CalendarZoomChangingEventArgs e) { RadCalendar calendar = sender as RadCalendar; if (calendar.FocusedDate.Month == 2 && calendar.FocusedDate.Day == 29) { calendar.FocusedDate = new DateTime(calendar.FocusedDate.Year, calendar.FocusedDate.Month, calendar.FocusedDate.Day - 1); } }
To reproduce: - Add a blank mask to a form and set its Mask type to Standard. - Set its mask to "###-##-##"; - Set its PromptChar to a single space. - Now set the caret before the '-' and type a two digits (the first digit is overridden by the second because the caret is not moved properly). Workaround: Subscribe to the following KeyDown event: void box1_KeyDown(object sender, KeyEventArgs e) { int caretPos = this.box1.MaskedEditBoxElement.TextBoxItem.SelectionStart; if ((e.KeyCode != Keys.Left && e.KeyCode != Keys.Right) && (e.KeyCode != Keys.Up && e.KeyCode != Keys.Down)) { if (caretPos < box1.Text.Length && box1.Text[caretPos] == '-') { this.box1.MaskedEditBoxElement.TextBoxItem.SelectionStart++; } } }
To reproduce: public Form1() { InitializeComponent(); this.radAutoCompleteBox1.AppendText("abc;"); } Workaround: append the text in the Form.Load event. private void Form1_Load(object sender, EventArgs e) { this.radAutoCompleteBox1.AppendText("abc;"); }
Note: When using WordByWord, the first suggested change is automatically shown in the "Change To" text box, however when using AllAtOnce, it is not, but the "Change" button is enabled. Pressing the Change button then adds the suggestion to the "Change To" text box, but doesn't update the word above, so you have to press the Change button a second time. Workaround: public Form1() { InitializeComponent(); this.radSpellChecker1.SpellCheckMode = Telerik.WinControls.UI.SpellCheckMode.AllAtOnce; this.radSpellChecker1.SpellingFormShowing += radSpellChecker1_SpellingFormShowing; } private void radSpellChecker1_SpellingFormShowing(object sender, Telerik.WinControls.UI.SpellingFormShowingEventArgs e) { RadButton changeButton = e.SpellingForm.Controls["buttonChange"] as RadButton; changeButton.PerformClick(); }
According to MSDN controls should not change the focus when handling the Enter event
Workaround: radSpinEditor1.SpinElement.TextBoxItem.HostedControl.MouseWheel += HostedControl_MouseWheel;
To reproduce: this.radDateTimePicker1.MaxDate = DateTime.Today; private void radButton1_Click(object sender, EventArgs e) { this.ValidateChildren(); } Workaround: this.radDateTimePicker1.MaxDate = new DateTime( DateTime.Today.Year,DateTime.Today.Month,DateTime.Today.Day, 23,59,59);
If you put RadTextBox on a form, set its Anchor to Bottom \ Left and you show the form using the following code: RadForm1 rf = new RadForm1(); rf.MdiParent = this; rf.WindowState = FormWindowState.Maximized;
Exception is thrown in RadTextBoxControl when the caret blink time is set to none.
To reproduce: Create a Windows Forms project - Add a RadDock. - Add 1 DocumentWindow and 1 ToolWindow to the RadDock control. - Add a RadTextBoxControl to the DocumentWindow. Give it a height that will allow you to easily scroll. - Run the application and enter enough text into the text box to make the scrollbar appear. - Scroll to the bottom of the textbox. - Minimize the application. Workaround: public class MyScroller : TextBoxScroller { public MyScroller(RadScrollBarElement scrollbar) : base(scrollbar) { } public override int Value { get { return base.Value; } set { if (value < this.MaxValue) { base.Value = value; } } } } Change it as follows: radTextBoxControl1.TextBoxElement.ViewElement.VScroller = new MyScroller(radTextBoxControl1.TextBoxElement.VScrollBar);
Workaround: public Form1() { InitializeComponent(); this.radMaskedEditBox1.MaskedEditBoxElement.TextBoxItem.KeyPress += TextBoxItem_KeyPress; } private void TextBoxItem_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '-') { this.radMaskedEditBox1.MaskedEditBoxElement.TextBoxItem.SelectionStart = this.radMaskedEditBox1.MaskedEditBoxElement.TextBoxItem.Text.Length; } }
To reproduce: RadSpellChecker radSpellChecker1 = new RadSpellChecker(); public Form1() { InitializeComponent(); RadTextBox radTextBox1 = new RadTextBox(); radTextBox1.Location = new Point(10, 10); this.Controls.Add(radTextBox1); this.radSpellChecker1.AutoSpellCheckControl = radTextBox1; } 1. Enter some valid text. 2. Select the content and right click with the mouse in order to copy the text by using the default context menu. However, the menu does not show. Note: if the control is not spellchecked, it shows default context menu associated with MS TextBox. Workaround: display your own menu with copy/paste options when no misspelled words are available. RadContextMenu menu = new RadContextMenu(); public TestSpellchecker() { InitializeComponent(); RadMenuItem copyItem = new RadMenuItem("Copy"); copyItem.Click += copyItem_Click; menu.Items.Add(copyItem); RadMenuItem pasteItem = new RadMenuItem("Paste"); pasteItem.Click += pasteItem_Click; menu.Items.Add(pasteItem); this.radTextBox1.TextBoxElement.TextBoxItem.TextBoxControl.MouseDown += TextBoxControl_MouseDown; } private void pasteItem_Click(object sender, EventArgs e) { this.radTextBox1.Paste(); } private void copyItem_Click(object sender, EventArgs e) { this.radTextBox1.Copy(); } static Regex wordParser = new Regex(@"[\p{L}\p{N}\p{M}]+(?:[-.'´_@][\p{L}|\p{N}|\p{M}]+)*", RegexOptions.Compiled); private void TextBoxControl_MouseDown(object sender, MouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Right) { TextBoxSpellChecker tbSpellChecker = this.radSpellChecker1.GetControlSpellChecker(typeof(RadTextBoxControl)) as TextBoxSpellChecker; MatchCollection words = wordParser.Matches(this.radTextBox1.Text); bool containsError = false; foreach (Match word in words) { string text = word.Captures[0].Value; if (!tbSpellChecker.SpellChecker.CheckWordIsCorrect(text, System.Threading.Thread.CurrentThread.CurrentCulture)) { containsError = true; break; } } if (!containsError) { menu.Show(this.radTextBox1, new Point(0,0)); } } }
The following stack trace is only available: <ErrorReport GeneratedDate="2015-10-07 14-10-25 435"><Exception><Type>ArgumentNullException</Type><Message>Value cannot be null. Parameter name: key</Message><Source>mscorlib</Source><TargetSite>Int32 FindEntry(TKey)</TargetSite><StackTrace> at System.Collections.Generic.Dictionary`2.FindEntry(TKey key) at Telerik.WinControls.RichTextBox.Proofing.WordDictionary.GetWordsByMetaphoneKey(String word) at Telerik.WinControls.RichTextBox.Proofing.DocumentSpellChecker.GetSuggestionsForDictionary(IWordDictionary dictionary, Dictionary`2 suggestions, String word) at Telerik.WinControls.RichTextBox.Proofing.DocumentSpellChecker.GetSuggestions(String word, CultureInfo culture) at Telerik.WinControls.UI.SpellCheckWordByWordForm.Initialize(String word, IControlSpellChecker spellCheckingManager) at Telerik.WinControls.UI.SpellCheckWordByWordForm.Telerik.WinControls.RichTextBox.UI.Extensibility.SpellChecking.ISpellCheckForm.Check(RadRichTextBox richTextBox, String word) at Manad.Plus.WindowsUI.Common.Controls.LocalInputBehaviour.ProcessRightMouseButtonDown(MouseEventArgs e) at Telerik.WinControls.RichTextBox.UI.InputBehavior.ProcessMouseDown(MouseEventArgs e) at Telerik.WinControls.RichTextBox.RadRichTextBox.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at Telerik.WinControls.RadControl.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)</StackTrace><Data>System.Collections.ListDictionaryInternal</Data><IsTerminating>False</IsTerminating><ExceptionInnerLevel>0</ExceptionInnerLevel>
To reproduce: Me.RadMaskedEditBox1.Mask = "c" Me.RadMaskedEditBox1.MaskType = MaskType.Numeric Me.RadMaskedEditBox1.Value = Nothing Try to enter "123". You will notice that after entering "1", the cursor is positioned after "$" instead of "1". Thus, the entered value will be "$231.00", instead the expected "$123.00" Workaround: initialize the RadMaskedEditBox with Value= 0.
To reproduce: - Set the mask like this: radMaskedEditBox1.Mask = "N0"; radMaskedEditBox1.MaskType = MaskType.Numeric; Set the value to "12345" move the caret to the first position and press '.' Workaround: void radMaskedEditBox1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '.') { e.Handled = true; } }
Please refer to the attached sample project. Workaround: keep the text box invisible until the form is shown.
To reproduce: this.radDateTimePicker1.DateTimePickerElement.TextBoxElement.MaskType = MaskType.FreeFormDateTime; string format = "MM/dd/yyyy - ddd"; radDateTimePicker1.Format = DateTimePickerFormat.Custom; radDateTimePicker1.CustomFormat = format; - Start the application and click the last part Workaround: class MyFreeFormDateTimeProvider : FreeFormDateTimeProvider { public MyFreeFormDateTimeProvider(string mask, CultureInfo culture, RadMaskedEditBoxElement owner) : base(mask, culture, owner) { } public override void SelectNextEditableItem() { if (this.SelectedItemIndex +1 == this.List.Count) { return; } base.SelectNextEditableItem(); } }