![]() |
editFeld für KFZKennzeichen konfigurieren
Hallo. Ich müsste ein Editfeld so konfigurieren, das dort nur KFZ Kennzeichen eingegeben werden können. Diese sollen so aussehen:
xxx-xx-xxxx Also Als erstes maximal 3 Buchstaben, dann das minus, dann maximal zwei buchstaben, dann ein minus und dann maximal 4 zahlen. Wie kann ich das machen?? |
Re: editFeld für KFZKennzeichen konfigurieren
dann schau dir mal das TMaskEdit an
|
Re: editFeld für KFZKennzeichen konfigurieren
Da wäre wohl ein TMaskEdit eine mögliche Lösung. Frag mich aber nicht, wie die Maske aussehen müsste, ich habe das Ding noch nie eingesetzt, weil es angeblich etwas buggy sein soll.
|
Re: editFeld für KFZKennzeichen konfigurieren
hm und wie könnte man das mit nem normalen edit machen???
habe nämlich auch noch nie mit nem maskedit gearbeitet. The_Tremendous |
Re: editFeld für KFZKennzeichen konfigurieren
Die Maskte sollte folgende sein
Code:
Auszug aus der Hilfe
Lll\-Ll\-099
Code:
Character Meaning in mask
! If a ! character appears in the mask, optional characters are represented in the text as leading blanks. If a ! character is not present, optional characters are represented in the text as trailing blanks. > If a > character appears in the mask, all characters that follow are in uppercase until the end of the mask or until a < character is encountered. < If a < character appears in the mask, all characters that follow are in lowercase until the end of the mask or until a > character is encountered. <> If these two characters appear together in a mask, no case checking is done and the data is formatted with the case the user uses to enter the data. \ The character that follows a \ character is a literal character. Use this character to use any of the mask special characters as a literal in the data. L The L character requires an alphabetic character only in this position. For the US, this is A-Z, a-z. l The l character permits only an alphabetic character in this position, but doesn't require it. A The A character requires an alphanumeric character only in this position. For the US, this is A-Z, a-z, 0-9. a The a character permits an alphanumeric character in this position, but doesn't require it. C The C character requires an arbitrary character in this position. c The c character permits an arbitrary character in this position, but doesn't require it. 0 The 0 character requires a numeric character only in this position. 9 The 9 character permits a numeric character in this position, but doesn't require it. # The # character permits a numeric character or a plus or minus sign in this position, but doesn't require it. : The : character is used to separate hours, minutes, and seconds in times. If the character that separates hours, minutes, and seconds is different in the regional settings of the Control Panel utility on your computer system, that character is used instead. / The / character is used to separate months, days, and years in dates. If the character that separates months, days, and years is different in the regional settings of the Control Panel utility on your computer system, that character is used instead. ; The ; character is used to separate the three fields of the mask. _ The _ character automatically inserts spaces into the text. When the user enters characters in the field, the cursor skips the _ character. |
Re: editFeld für KFZKennzeichen konfigurieren
evtl sollte man bei einer Prüfung beachten,
daß z.B. Behördenkennzeichen ohne Buchstaben in der Mitte gibt, die dafür 6 Ziffern haben, Oldtimerkennzeichen die ein H am Ende haben etc ... den Aufbau aller deutschen Kennzeichen kannst Du hier nachlesen : ![]() |
Re: editFeld für KFZKennzeichen konfigurieren
Moin,
vielleicht solltest du es mit 3 EditFeldern probieren? Oder musst du unbedingt auf ein EditFeld ausweichen? Ansonsten, wie wäre es mit einer IF-Abfrage. Solltest die "Zahl" als string einlesen und dann in mit den befehlen des schneiden (cut,copy,etc) vielleicht geziehlt auseinander nehmen. Wäre mein Vorschlag! |
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:40 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz