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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MaskedEditBox and SelectAll

Thread ID:

Created:

Updated:

Platform:

Replies:

18975 Sep 14,2004 10:48 PM UTC Sep 16,2004 10:12 AM UTC WinForms 3
loading
Tags: Tools
Madhavi Balusu
Asked On September 14, 2004 10:48 PM UTC

Hi, On Entering my MaskedEditBox control, I want to SelectAll the whole text/mask in the control. So I added a delegate for the "Enter" event and did m_MaskEditCtrl.SelectAll() in OnEnter, but this did not select the whole text. Infact there was no selection at all. What am I doing wrong? Here is the codesnippet: this.Enter += new EventHandler(OnEnter); private void OnEnter(object sender, EventArgs e) { this.SelectAll(); }

Administrator [Syncfusion]
Replied On September 15, 2004 01:34 PM UTC

Hi, You could accomplish this by handling the MaskedEditBox''s GotFous event instead as shown in code below : this.maskedEditBox1.GotFocus += new EventHandler(MaskedEditBox_GotFocus); private void MaskedEditBox_GotFocus(object sender, EventArgs args) { this.maskedEditBox1.SelectAll(); } Please refer to the test sample attached that illustrates this, and let me know if this works for you. Regards, Guru Patwal Syncfusion, Inc.

Madhavi Balusu
Replied On September 15, 2004 01:53 PM UTC

Thanks that works. I have other derived editcontrols which SelectAll in Enter event. This is the only control in which I selectall in GotFocus event. 1) Why, is this your bug? 2) For consistency can I do selectall for other edit controls like CurrencyEdit, DoubleTextBox also in GotFocus event. Or is that a bad idea?

Administrator [Syncfusion]
Replied On September 16, 2004 10:12 AM UTC

Hi, Thanks for the update. 1. Yes, this appears to be a shortcoming in our MaskedEditBox control and we will address this issue in our future releases. 2. You could use either of the 2 events - GotFocus or Enter for our other Editor controls. We appreciate your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

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.

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

;