D
D
DancingOnWater2015-06-24 11:01:27
C++ / C#
DancingOnWater, 2015-06-24 11:01:27

How to set Culture for Mask in MaskedTextBox?

There is a problem if I do this:

m_TextBox.Culture = CultureInvariantHelper.ci;
m_TextBox.Mask = "00:00:00.000 00.00.0000";

Then my mask is not as expected, namely: "00:00:00 , 000 00 , 00 , 0000". If I do this:
m_TextBox = new MaskedTextBox( "00:00:00.000 00.00.0000",  CultureInvariantHelper.ci)

Then I get the desired result. But the trouble is that this boxing text should be pushed into the control, and then the designer and the second option should be used - the crutch. So all the same, I want to return to let the true one.
Yes, I almost forgot .Net 3.5

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Lastochkin, 2015-06-24
@lasalas

m_TextBox.Mask = @"00:00:00\.000 00\.00\.0000"; // Culture doesn't need to be changed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question