Forum  General Visual ...  Visual WebGui v...  TextBox and MaskedTextBox not firing OnKeyPressed when overridden
Previous Previous
 
Next Next
New Post 2/22/2012 7:24 AM
Unresolved
  asaporta
3 posts
No Ranking


TextBox and MaskedTextBox not firing OnKeyPressed when overridden 

Hi There,

I am attempting to extended MaskedTextBox and TextBox.  I need to overide the OnKeyPressed event, but the event does not get fired.

Here is my code:

 

public partial class CurrencyTextBox : TextBox public CurrencyTextBox()protected override void OnKeyPress(KeyPressEventArgs e)char ch = e.KeyChar;if (!Char.IsDigit(ch) && ch != 8) e.Handled = true;base.OnKeyPress(e);

public

partial class MaskedCurrencyTextBox : MaskedTextBox

{

 

{

InitializeComponent();

}

 

{

 

}

}

public MaskedCurrencyTextBox()protected override void OnKeyPress(KeyPressEventArgs e)base.OnKeyPress(e);

 

Regards,

Avri

 

{

 

{

InitializeComponent();

}

 

{

 

 

 

}

 

 

 

}

 

 
New Post 2/23/2012 1:20 PM
  palli
11838 posts
1st Level Poster




Re: TextBox and MaskedTextBox not firing OnKeyPressed when overridden 

Hi Avri,

What version of Visual WebGui are you using ?

In any case, your code became unreadable when pasted in the message, so please create the most minimal sample application that will demonstrate your problem, clean it, zip it and then email it to the support email address (see my signature). Please remember fo include in that email the full Http reference to this thread and also please add a new post here when you have sent it.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  General Visual ...  Visual WebGui v...  TextBox and MaskedTextBox not firing OnKeyPressed when overridden
CompanionKit Bottom
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS