Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delphi 5 MaskEdit Problem?

Status
Not open for further replies.

jaja1973

Programmer
May 30, 2002
2
GB
Maskedit controls are beginning to do my head in!

How can you tell if a Maskedit control is empty or not, bearing in mind that the editMask property is not always the same?

I've tried checking the Text property aswell as the EditText but to no avail.

Am I missing something or what?

 
Experimenting with the maskedit for about five minutes it seems that if you set a string variable to := MaskEdit1.SelText, when the maskedit contains text, the string will return ''. If there is no text, it will return with the actual maskedit text (ie, Date, '__/__/__'). So, if the string is empty the maskedit isnt and vice versa.
 
Just one problem with that, is that the only way it'll work is if the text within the control is hilighted/selected.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top