FIX. RadMaskedEditBox- black border appears on disabled control with Windows7 theme.
FIX. RadDateTimePicker throws an exeption, when trying to set the value with ShowUpDown true and previous value = null
FIX. RadSpinEditor - TextChanged of the control is not fired. Should fire in the same cases as the TextChanged event of the element.
FIX. RadSpinEditor's Text property should act the same way as the Text property of the element
To reproduce: Add a TableLayout and in the cells add a RadtextBox with its multiline property set to true. Resize the form until the textboxes and unclickable and no scrollbars are shown. This behavior does not always occur. Workaround: Use a custom RadTextBox class: public class MyTextBox : RadTextBox { protected override void InitializeTextElement() { this.GetType().BaseType.GetField("textBoxElement", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(this, new MyTextBoxElement()); this.TextBoxElement.StretchVertically = true; this.TextBoxElement.ShowBorder = true; } } public class MyTextBoxElement : RadTextBoxElement { protected override SizeF MeasureOverride(SizeF availableSize) { availableSize.Width -= BorderThickness.Size.Width; availableSize.Height -= BorderThickness.Size.Height; SizeF desiredSize = this.MeasureChildren(availableSize); return desiredSize; } protected override Type ThemeEffectiveType { get { return typeof(RadTextBoxElement); } } }
To reproduce: Add a RadSpellChecker and a RichTextBox, set the spell checker to check the RichTextBox on some button click. Set the main form's TopMost property to true. Start the form, you will notice that sometimes the dialog for spellchecking and the complete messagebox show behind the main form. Workaround: public class MyRadSpellChecker : RadSpellChecker { private FormSettings formSettingsForCurrentSpellCheckIteration = new FormSettings(); public MyRadSpellChecker() { } protected override void CheckAllAtOnce(IControlSpellChecker spellChecker) { Form spellCheckerParentForm = this.GetSpellCheckerParentForm(spellChecker); RadDocument editingElementContentToRadDocument = spellChecker.GetContentAsDocument(); editingElementContentToRadDocument.Measure(RadDocument.MAX_DOCUMENT_SIZE); IControlSpellChecker richTextBoxSpellChecker = this.GetControlSpellChecker(typeof(RadRichTextBox)); SpellCheckAllAtOnceForm checkAllAtOnceWindow = new SpellCheckAllAtOnceForm(editingElementContentToRadDocument, richTextBoxSpellChecker, spellChecker); if (!checkAllAtOnceWindow.HasErrors) { this.ShowSpellCheckingCompleteDialog(spellCheckerParentForm); return; } this.CopyFormSettings(this.FormSettings, checkAllAtOnceWindow); SpellingFormShowingEventArgs args = new SpellingFormShowingEventArgs(checkAllAtOnceWindow, spellChecker); this.OnSpellingFormShowing(args); if (args.Cancel) { return; } Form form = args.SpellingForm; form.ShowDialog(spellCheckerParentForm); } private void CopyFormSettings(FormSettings from, RadForm to) { to.Location = from.Location; to.StartPosition = from.StartPosition; ThemeResolutionService.ApplyThemeToControlTree(to, from.ThemeName); } private void ShowSpellCheckingCompleteDialog(Form parentForm = null) { if (this.EnableCompleteMessageBox) { string themeName = RadMessageBox.ThemeName; RadMessageBox.ThemeName = this.ThemeName; string title = RadSpellCheckerLocalizationProvider.CurrentProvider.GetLocalizedString(RadSpellCheckerStringId.Title); string complete = RadSpellCheckerLocalizationProvider.CurrentProvider.GetLocalizedString(RadSpellCheckerStringId.Complete); RadMessageBox.Show(parentForm, complete, title, MessageBoxButtons.OK); RadMessageBox.ThemeName = themeName; } } protected override void CheckWordByWord(IControlSpellChecker spellChecker) { this.CopyWindowSettings(this.FormSettings, this.formSettingsForCurrentSpellCheckIteration); DialogResult result = DialogResult.None; do { result = this.ShowWindowForNextError(spellChecker); } while (result != DialogResult.None && result == DialogResult.OK); } private void CopyWindowSettings(FormSettings from, FormSettings to) { to.Location = from.Location; to.StartPosition = from.StartPosition; to.ThemeName = from.ThemeName; } private DialogResult ShowWindowForNextError(IControlSpellChecker spellChecker) { Form spellCheckerParentForm = this.GetSpellCheckerParentForm(spellChecker); spellChecker.ResetFields(); IWordInfo incorrectWordInfo = spellChecker.MoveToNextError(); if (incorrectWordInfo == null) { this.ShowSpellCheckingCompleteDialog(spellCheckerParentForm); return DialogResult.None; } RadForm checkWordByWordWindow = new SpellCheckWordByWordForm(incorrectWordInfo.Word, spellChecker); this.CopyFormSettings(this.formSettingsForCurrentSpellCheckIteration, checkWordByWordWindow); SpellingFormShowingEventArgs args = new SpellingFormShowingEventArgs(checkWordByWordWindow, spellChecker); this.OnSpellingFormShowing(args); if (args.Cancel) { return DialogResult.None; } checkWordByWordWindow = args.SpellingForm; spellChecker.CurrentControl.Focus(); return checkWordByWordWindow.ShowDialog(spellCheckerParentForm); } private Form GetSpellCheckerParentForm(IControlSpellChecker spellChecker) { if (spellChecker != null && spellChecker.CurrentControl != null) { return spellChecker.CurrentControl.FindForm(); } return null; } }
To reproduce: Create two forms - form 1 has a button which creates a new form 2 Form 2 has a button and a RichTextBox. The button should create a spellchecker. Write something into the richtextbox and click the button. Close the spellchecking form and form 2. Repeat a few times, memory usage should increase.
1. Create a new application with RadMarkupDialog. 2. Use the ILMerge tool to merge all assemblies in one executable file. 3. Run that file. You will see that all images are missing.
1. Create new project and add RadTextBox inside a user control. 2. Set its Dock property to Left. 3. Add custom button items in its layout by using RadButtonElement and StackLayoutElement. 4. Set a default value to the text box when handling the form Load event. 5. Run the project.
1. Create a new project and add RadBrowseEditor. 2. Run the project. 3. Select some folder in the editor. 4. Try to click with the mouse somewhere inside the editor.
first digit entered 3 would display 0.03 second digit 5 entered would display 0.35 third digit 0 entered would display 3.50
When MaskedEditBox uses currency mask (c) and the culture is he-IL, user input is entered incorrectly.
Allow RadSpellChecker to perform check spelling for many controls. Reason for denial: The RadSpellCheker knows the associated document and for example if a user presses ignore all (in as you type) this should be ignored only for specific documents. Also spell checker is inherited from MS component named 'Native Windows' which allows spell checker to receive a WND messages from the associated control.
Improve the RadSpellChecker component by adding localization support.
To reproduce: - add a RadTextBox with empty Text property but NullText property has some value. - change the Font style to Microsoft Sans Serif, 8.5pt. As a result the RadTextBox height is decresed a little and the NullText is cut off Workaround: use Text property instead of NullText and cutomize its ForeColor to gray: Font newFont = new Font("Microsoft Sans Serif", 8.5f); public Form1() { InitializeComponent(); this.radTextBox1.Font = newFont; this.radTextBox1.Text = this.radTextBox1.NullText; this.radTextBox1.TextBoxElement.ForeColor = Color.Gray; this.radTextBox1.GotFocus+=radTextBox1_GotFocus; this.radTextBox1.LostFocus+=radTextBox1_LostFocus; this.radButton1.Select(); } private void radTextBox1_LostFocus(object sender, EventArgs e) { if (this.radTextBox1.Text==this.radTextBox1.NullText||this.radTextBox1.Text==string.Empty) { this.radTextBox1.Text = this.radTextBox1.NullText; this.radTextBox1.TextBoxElement.ForeColor = Color.Gray; } else { this.radTextBox1.TextBoxElement.ForeColor = Color.Black; } } private void radTextBox1_GotFocus(object sender, EventArgs e) { if (this.radTextBox1.Text==this.radTextBox1.NullText) { this.radTextBox1.Text = string.Empty; this.radTextBox1.TextBoxElement.ForeColor = Color.Gray; } else { this.radTextBox1.TextBoxElement.ForeColor = Color.Black; } }
To reproduce: -add RadTimePicker and set its value to null. -click the arrow to open the pop up and notice that clock header used the default general DateTime pattern to display the text (e.g. 9/18/2013 12:00:00 AM), instead of using the short time pattern displayed (e.g. 12:00 AM) Workaround: this.radTimePicker1.Value = null; this.radTimePicker1.TimePickerElement.PopupOpened+=TimePickerElement_PopupOpened; private void TimePickerElement_PopupOpened(object sender, EventArgs e) { this.radTimePicker1.TimePickerElement.PopupContentElement.ClockHeaderElement.Text = DateTime.Now.ToString(this.radTimePicker1.TimePickerElement.Format, this.radTimePicker1.TimePickerElement.Culture); }
To reproduce: use the following code: public Form1() { InitializeComponent(); RadMaskedEditBox maskControl = new RadMaskedEditBox(); maskControl.TextMaskFormat = System.Windows.Forms.MaskFormat.ExcludePromptAndLiterals; CultureInfo ci = CultureInfo.CreateSpecificCulture(Thread.CurrentThread.CurrentCulture.Name); ci.NumberFormat.NumberGroupSeparator = ""; maskControl.Culture = ci; maskControl.Text = "2"; object o = maskControl.Value; //Exception!! this.Controls.Add(maskControl); } Workaround: Do not set NumberGroupSeparator to String.Empty when TextMaskFormat=ExcludePromptAndLiterals
To reproduce: -add RadGridView and use the following code: public static readonly DateTime MIN_DATE = new DateTime(1900, 1, 1); public static readonly DateTime MAX_DATE = new DateTime(2079, 1, 1); public Form1() { InitializeComponent(); var colDate = new Telerik.WinControls.UI.GridViewDateTimeColumn(); colDate.DataType = typeof(System.DateTime); colDate.HeaderText = "Date"; colDate.Name = "colDate"; colDate.FormatString = "{0:d}"; colDate.Width = 85; radGridView1.Columns.Add(colDate); radGridView1.CellEditorInitialized += radGridView1_CellEditorInitialized; } private void radGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e) { var editor = this.radGridView1.ActiveEditor as RadDateTimeEditor; if (editor == null) { return; } editor.MinValue = MIN_DATE; editor.MaxValue = MAX_DATE; DateTime date = DateTime.Now; RadDateTimeEditorElement editorElement = (RadDateTimeEditorElement)editor.EditorElement; editorElement.Format = DateTimePickerFormat.Custom; editorElement.CustomFormat = "MM/dd/yyyy"; editorElement.Value = date; e.Row.Cells[e.ColumnIndex].Value = editorElement.Value; } As a result when the user tries to enter a valid year between MinValue and MaxValue it is not possible. Workaround: use CellValidating event: radGridView1.CellValidating += radGridView1_CellValidating; private void radGridView1_CellValidating(object sender, CellValidatingEventArgs e) { RadGridView grid = sender as RadGridView; if (grid.CurrentColumn is GridViewDateTimeColumn) { DateTime currentDate = (DateTime)e.Value; if (currentDate <= MAX_DATE && currentDate >= MIN_DATE) { e.Cancel = false; } else { e.Cancel = true; } } }
To reproduce: - create a descendant of RadTextBox - add RadSpellChecker to the form - try to check the value of the custom text box