On Tue, Feb 23, 2021 at 6:55 PM Juha Manninen via lazarus <[email protected]> wrote:
> How about TMask? Does it have the same syntax as TMaskEdit or are they > different? TMask (unit masks) deals with masks with wildcards (*,? and sets of single byte chars). It is mainly used for matching filenames (similar to the Path supplied to FindFirst). TMaskEdit gives you the possibility to constrain user input to almost anything you like, Can be used for e.g. ZIP codes, only numbers etc. It also handles pasting in the control. If the text the user enters does not match the specified mask when the control looses focus (or user presses enter) an exception is raised. In the Delphi 1,2,3 years I used it to force numeric input (integers and floats), for which we nowadays have better controls. There is a data aware counterpart as well. As you have pointed out before, the GetCodePoint function in the Masks unit needs overhoaling. (It is the same as in TMaskEdit, but that only reacts to user input with strings <=255 chars, so speed is not required there: I'ld love to see someone typing faster that the code in TMaskEdit calculates what needs to be done.) -- Bart -- _______________________________________________ lazarus mailing list [email protected] https://lists.lazarus-ide.org/listinfo/lazarus
