StrataFrame Forum

MaskedTextBox

http://forum.strataframe.net/Topic23335.aspx

By Larry Caylor - 6/3/2009

I'm not sure if this is a bug or an enhancement request but the v 1.6.7 SF MaskedTextBox causes an unhandled exception when the mask is set to "". This wasn't a problem prior to 1.6.7. I have a need to set the mask property at run time depending on the data. If the data doesn't require a mask I'd like to leave it blank and just let the control render the text value.

Looking a the SF maskedtexbox class, when the mask is not set the MaskTextProvider is set to nothing and causes the unhandled exception when trying to set the renderText variable in the OnPaint method.

By Trent L. Taylor - 6/3/2009

Do you mind posting your stack trace so I have it for reference? Thanks.
By Larry Caylor - 6/3/2009

Attached is a debug screen shot of where the error occurs in maskedtextedit.vb in the framework. I coded around it by placing a check to see if Me.MaskedTextProvider is Nothing and if so just setting renderText = me.text.
By Trent L. Taylor - 6/3/2009

Thanks!  I will get this taken care of in the morning! Smile