views:

47

answers:

1

Is there a way to specify the maximum number of characters allowed in an edit control in Wix?There does not appear to be a property such as Maxlength.

The only option I can think of is to use a MaskedEdit control, but there is no option to specify the field length directly. So, to set the Maxlength to say 50 characters, I would have to type 50 wild card characters in the mask. I was hoping for an easier way to do this.

+3  A: 

From the Edit Control documentation:

The length of text that can be entered can be limited by putting a number from 0 to 2147483646 in curly braces at the beginning of the Text field in the Control table. For example, if the text field starts with {80}, the length of the string is limited at 80 characters. If no such limit is supplied in the table, or if 0 is specified, the length is set to the maximum possible (2147483646 characters). A negative or non-numeric value will generate an error.

Wim Coenen
Thanks! Note to self: Should not rely solely on Wix documentation, and must always consult the underlying MSI documentation.
Faraz

related questions