Forum > Beginners

Formatted input to edit field in form

(1/1)

gjunk:
I am writing a program in Lazarus v3 for windows 10.
I created a form for input.
I has around 60 edit fields.
I print this form to a pdf file and send it as an email attachment.
All of this works so far.
In need to learn how to input to a field formatted to a date or time format.
##/##/## or ##:##:##.
Can someone show me how to do this or point me to a book or tutorial?

TRon:

--- Quote from: gjunk on March 26, 2024, 12:49:13 pm ---Can someone show me how to do this or point me to a book or tutorial?

--- End quote ---
See wiki, LCL documentation and Delphi example and for sure there must be some code using maskedit control in the Lazarus examples directory.

Bart:
Eitger use a TMaskEdit or use TTimeEdit/TDateEdit.
The latter ones ensure that input is valid.

Bart

TRon:

--- Quote from: Bart on March 26, 2024, 01:01:10 pm ---..or use TTimeEdit/TDateEdit.

--- End quote ---
Even better than my suggestion :)

gjunk:
Thank you for your suggestions.
I will give it a try.

Navigation

[0] Message Index

Go to full version