AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Sonstige Fragen zu Delphi Delphi editFeld für KFZKennzeichen konfigurieren
Thema durchsuchen
Ansicht
Themen-Optionen

editFeld für KFZKennzeichen konfigurieren

Ein Thema von The_Tremendous · begonnen am 4. Jan 2005 · letzter Beitrag vom 4. Jan 2005
Antwort Antwort
The_Tremendous

Registriert seit: 10. Nov 2004
65 Beiträge
 
#1

editFeld für KFZKennzeichen konfigurieren

  Alt 4. Jan 2005, 20:10
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??
  Mit Zitat antworten Zitat
Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#2

Re: editFeld für KFZKennzeichen konfigurieren

  Alt 4. Jan 2005, 20:12
dann schau dir mal das TMaskEdit an
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#3

Re: editFeld für KFZKennzeichen konfigurieren

  Alt 4. Jan 2005, 20:12
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.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
The_Tremendous

Registriert seit: 10. Nov 2004
65 Beiträge
 
#4

Re: editFeld für KFZKennzeichen konfigurieren

  Alt 4. Jan 2005, 20:30
hm und wie könnte man das mit nem normalen edit machen???

habe nämlich auch noch nie mit nem maskedit gearbeitet.


The_Tremendous
  Mit Zitat antworten Zitat
Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#5

Re: editFeld für KFZKennzeichen konfigurieren

  Alt 4. Jan 2005, 20:46
Die Maskte sollte folgende sein
Code:
Lll\-Ll\-099
Auszug aus der Hilfe
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.
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  Mit Zitat antworten Zitat
Kamephis

Registriert seit: 22. Jun 2004
12 Beiträge
 
Delphi 7 Enterprise
 
#6

Re: editFeld für KFZKennzeichen konfigurieren

  Alt 4. Jan 2005, 20:58
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 :
http://de.wikipedia.org/wiki/Liste_d...fz-Kennzeichen
  Mit Zitat antworten Zitat
Benutzerbild von whiteshark
whiteshark

Registriert seit: 4. Dez 2003
Ort: Cottbus
222 Beiträge
 
Delphi 2005 Personal
 
#7

Re: editFeld für KFZKennzeichen konfigurieren

  Alt 4. Jan 2005, 21:20
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!
Men are born ignorant, not stupid; they are made stupid by education. - Bertrand Russell

I cannot teach anybody anything, i can only make them think. - Socrates
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:09 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz