cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Brandon_Lowe
Level 6

Masked edit field question

I'm creating a custom dialog with a masked edit field. I'm not sure what to use in the mask.
Right now it is <#####-#####-#####-#####-#####>
this work but only lets me enter numbers. What should I use for Alphanumeric in the mask?
Labels (1)
0 Kudos
(9) Replies
DLee65
Level 13

Try using <^^^^^-^^^^^-^^^^^-^^^^^-^^^^^>
0 Kudos
Brandon_Lowe
Level 6

That mask will still let me enter in %^&* and charators like that. Is there a way to mask out those? I just want letters and numbers.
0 Kudos
DLee65
Level 13

You are correct, this format allows all characters. So you just want a limited set [0-9][A-Z][a-z], correct?

Unfortunately I have not found a way to implement a mask that does this. I just have to check the results and report back to the user that they entered an illegal character.
0 Kudos
DLee65
Level 13

I went back to the instructions for the Masked Edit control on MSDN and I am a bit confused by the instructions.

Look at this quote:
The alternate digit, %, and alternate alphanumeric characters, ^, ?, and ` fields allow custom actions to differentiate between fields in a way that can be controlled by the mask, for example, ^ can be used for fields that should be uppercase.


Our use of the carrot symbol, ^, does not force upper case characters, so perhaps my understanding of the rules is incorrect.

Hopefully Robert or Michael can chime in on this.

I am wondering if the following would work <@^#^@^# ... >
0 Kudos
DLee65
Level 13

There was another post a while ago concerning this that I found:

http://community.macrovision.com/showthread.php?t=138101&highlight=Masked+Edit

Unfortunately it came to the same conclusion is that the masked edit control does not provide the level of filter needed to limit this to strict alphanumeric characters [0-9][a-zA-Z]. Too bad they did not support regular expressions for a filter that would be the best type of implementation.
0 Kudos
Brandon_Lowe
Level 6

I normally write installs in installscript and can do most anything there but my company wants me to look at converting to MSI installs.
I know in installscript and can make the fields do what I want them to do.
0 Kudos
DLee65
Level 13

Well, with IS2009 and windows installer 4.5 support of the embedded UI you could use an InstallScript UI if that is acceptable to the company.
0 Kudos
Brandon_Lowe
Level 6

Where can I get info on the embedded UI stuff?
I have been closed into installscript for so long I feel like I'm new to installs when I start working with MSI and windows installer.
0 Kudos
RobertDickau
Flexera Alumni

For a start, please see "Using the InstallScript Engine as an External vs. Embedded UI Handler for InstallScript MSI Installations" in the InstallShield 2009 help.
0 Kudos