![]() With subclassing you create a new class that is based upon an existing class. As it turns out, this is easy to do with subclassing. Then you would just use your custom TextField everywhere in your app that needs it. The solution is to create your own TextField control that has this trimming functionality built-in to its FocusLost event. This is great, but it what if you have a lot of TextFields over many, many layouts?Īdding this bit of code over and over to 20 or more TextFields would get tedious, not to mention the work entailed if you ever decided to update that code in the future. If the user leans on the spacebar, when they leave the field, your code will remove any spaces at the beginning or end of the entry. To the FocusLost event of a TextField and you 'll have just that. ![]() Reporting bugs and making feature requests. ![]()
0 Comments
Leave a Reply. |