We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

maskeditbox in readonly not working.....

Thread ID:





18653 Sep 6,2004 09:00 PM UTC Sep 8,2004 12:30 AM UTC WinForms 1
Tags: Tools
Administrator [Syncfusion]
Asked On September 6, 2004 09:00 PM UTC

The user is able to delete the values shown in a read only maskedit box....I don''t think this is the right behavior. I tried setting the readonly flag during runtime, but I get the same results. I could use the Enable property, but this doesn''t allow me to change the color of the font. Javier

Administrator [Syncfusion]
Replied On September 8, 2004 12:30 AM UTC

Hi Javier, Thanks for bringing this to our attention. IU have notified the developmentteam in this regard, and will try our very best to resolve this issue at the earliest. For now, you could derive from the MaskedEditBox control and override its ProcessCmdKey method as shown in the code snippet below : public class CustomMaskedEditBox : MaskedEditBox { public CustomMaskedEditBox() : base() {} protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (this.ReadOnly == true) { if (keyData == Keys.Delete) { //do nothing return true; } else return false; } else return base.ProcessCmdKey (ref msg, keyData); } } The complete sample illustrating this is attached here. Please refer to it and let me know if this works for you. We appreciate your feedback, and thanks for choosing Syncfusion. Regards, Guru Patwal Syncfusion, Inc.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon