Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1785
MaskInput stripping capital letters
posted

OK, I've encountered a weird issue.  I have a column in my UltraWinGrid (still stuck on 2012 volume 2).  The column displays the name of regions and my test data has values such as "Region One", "Region Two", etc.

I want the cell to be preceded with a "REGION:" label, so I have the following:

With .Columns("Name")
   .MaskInput = "\R\E\G\I\O\N\:  &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"     ' the name can be 30 characters long
   .MaskDisplayMode = MaskMode.IncludeLiterals
   .MaskLiteralsAppearance.ForeColor = Color.DimGray
End With

When my grid displays, I get the grey text "REGION:" prefix that I want, but any region that begins with a capital letter gets that letter stripped.  "Region One" shows as "egion One".  If the name starts with a lowercase letter, it shows fine - e.g. "region two" shows as "region two".

EDIT - turns out it's ALL capital letters at the beginning that get stripped.  "REGion three" shows as "ion three".  I thought ampersand was "any character"?

What in the world could be wrong!  I am at my wits end trying to figure this out.

Parents
  • 1785
    Offline posted

    OK, more testing yields stranger results.  It seems that the capital letters only get stripped if they match any of those literal placeholders...

    "TEST one" displays as "TEST one"

    "REGion two" displays as "ion two"

    "REGION test" displays as " test"

    Am I doing something wrong with those escape characters to get "REGION:" to show as a prefix?  There's nothing in the MaskInput help info I can see that leads me to think something's amiss.

Reply Children
No Data