Dialog - how to stop user clicking Next if invalid serial no
Posted: Wed Jun 20, 2007 2:58 am
In a dialog form, I added a new edit control for the user to enter a serial number.
The Next button should only be able to be clicked when a valid serial number is entered.
So I created these rules:
IF (edtSerial.Text = "BB9132") THEN Next.Enabled := True
IF (edtSerial.Text = "TT7345") THEN Next.Enabled := True
etc (20 lines in all)
The Enabled property of the Next button was set to False.
When I ran the Test dialog the Enabled button never turned to Enabled.
Am I doing this correctly?
The Next button should only be able to be clicked when a valid serial number is entered.
So I created these rules:
IF (edtSerial.Text = "BB9132") THEN Next.Enabled := True
IF (edtSerial.Text = "TT7345") THEN Next.Enabled := True
etc (20 lines in all)
The Enabled property of the Next button was set to False.
When I ran the Test dialog the Enabled button never turned to Enabled.
Am I doing this correctly?