String Grid cell validation & edit mask
Posted on 2001-08-08
Hi, I'm trying to ensure that each cell in a string grid contains data in a valid 24hour time format. I have a geteditmask event but this does not seem to force the user to enter four digits, they can enter less. I also want to validate the cell to ensure that the value ranges from 0000 to 2400 - ideally I'd like to do this on a cell by cell basis as the user changes each value but I can't find an event that allows me to do this.
Any ideas please? Thanks, P
procedure TFrmOperatingTimesProfile.SGTimesGetEditMask(Sender: TObject;
ACol, ARow: Integer; var Value: String);
//set the edit mask for 24 hour time
Value := '!00:00;0;-';