Edit Mask

Category
Programming
Components and Libraries

Review

If you have chosen to mask for Date, you specify the mask to use (let's say "MM/dd/yy") and the control will take care of the rest and only allow entries for that exact mask, even changing text color to red (by default, but you can change that) if it is not a correct input for that mask, thus notifying the user that it's not right. A truly unique feature is the Valid From and Valid To range that can be set for each data type. This means that values which are valid, but out of the specified range, are shown in red and the status is set to invalid and either above or below the range so you know exactly what the user has done from code. Another great feature is when the component does not have focus you can specify a different mask to use, thus displaying a more readable value when the data is not being edited. It makes reports and data entry forms that much more user friendly and allows you more options when you're busy with development. It's really easy to use as a currency component: initially it checks the environments culture to choose the currency symbol to use but this can be changed to any string value. For instance, you may not be happy with just a pound sign so you can add a GBP from code. The up/down buttons can be customised too, from border types to background and border colors. Resolution (the amount to decrement/increment by) can be adjusted at run-time as well as in the IDE. Or if you don't want to see the buttons, just hide them. This is a great way to edit or display times as well, because users can sometimes be a little trying, and validation from code after the user has entered the data and clicked on the Save button is always tiresome, we know... Now the user can only enter valid values with a nice neat error flag to tell you the data is incorrect!


Search

Recent searches