* * * *

Privacy Policy

Blog italiano

Clicca qui se vuoi andare al blog italiano su Lazarus e il pascal.

Forum ufficiale

Se non siete riusciti a reperire l'informazione che cercavate nei nostri articoli o sul nostro forum vi consiglio di visitare il
Forum ufficiale di Lazarus in lingua inglese.

Lazarus 1.0

Trascinare un file nel programma
DB concetti fondamentali e ZeosLib
Recuperare codice HTML da pagina web
Mandare mail con Lazarus
Stabilire il sistema operativo
Esempio lista in pascal
File INI
Codice di attivazione
Realizzare programmi multilingua
Lavorare con le directory
Utilizzare Unità esterne
TTreeView
TTreeview e Menu
Generare controlli RUN-TIME
LazReport, PDF ed immagini
Intercettare tasti premuti
Ampliare Lazarus
Lazarus e la crittografia
System Tray con Lazarus
UIB: Unified Interbase
Il file: questo sconosciuto
Conferma di chiusura di un applicazione
Liste e puntatori
Overload di funzioni
Funzioni a parametri variabili
Proprietà
Conversione numerica
TImage su Form e Panel
Indy gestiore server FTP lato Client
PopUpMenu sotto Pulsante (TSpeedButton)
Direttiva $macro
Toolbar
Evidenziare voci TreeView
Visualizzare un file Html esterno
StatusBar - aggirare l'errore variabile duplicata
Da DataSource a Excel
Le permutazioni
Brute force
Indy 10 - Invio email con allegati
La gestione degli errori in Lazarus
Pascal Script
Linux + Zeos + Firebird
Dataset virtuale
Overload di operatori
Lavorare con file in formato JSON con Lazarus
Zeos ... dietro le quinte (prima parte)
Disporre le finestre in un blocco unico (come Delphi)
Aspetto retrò (Cmd Line)
Lazarus 1.0
Come interfacciare periferica twain
Ubuntu - aggiornare free pascal e lazarus
fpcup: installazioni parallele di lazarus e fpc
Free Pascal e Lazarus sul Raspberry Pi
Cifratura: breve guida all'uso dell'algoritmo BlowFish con lazarus e free pascal.
Creare un server multithread
guida all'installazione di fpc trunk da subversion in linux gentoo
Indice
DB concetti fondamentali e connessioni standard
Advanced Record Syntax
DB concetti fondamentali e DBGrid
DB concetti fondamentali e TDBEdit, TDBMemo e TDBText
Advanced Record Syntax: un esempio pratico
Superclasse form base per programmi gestionali (e non)
Superclasse form base per programmi gestionali (e non) #2 - log, exception call stack, application toolbox
Superclasse form base per programmi gestionali (e non) #3 - traduzione delle form
Superclasse form base per programmi gestionali (e non) #4 - wait animation
Un dialog per la connessione al database:TfmSimpleDbConnectionDialog
Installare lazarus su mac osx sierra
immagine docker per lavorare con lazarus e free pascal
TDD o Test-Driven Development
Benvenuto! Effettua l'accesso oppure registrati.
Novembre 23, 2024, 03:42:37 am

Inserisci il nome utente, la password e la durata della sessione.

104 Visitatori, 0 Utenti

Autore Topic: Sintassi per la proprietà EditMask di un TDBEdit  (Letto 8822 volte)

Fabio

  • Full Member
  • ***
  • Post: 106
  • Karma: +0/-0
Sintassi per la proprietà EditMask di un TDBEdit
« il: Aprile 15, 2012, 10:34:43 am »
Avete qualche riferimento su che sintassi usare per generare le maschere dei controlli dbedit?

Dopo varie ricerche non ho trovato documentazione a riguardo ma una serie di esempi che però non spiegano niente sul perchè del formato quindi volendo crearne dei propri potrei solo andare a intuito.

Gli esempi trovati sono questi:

Codice: [Seleziona]
Phone | 4155551212 | !\(999\)000-0000;1;_
Extension | 15450 | !99999;1;_
Social Security | 555555555 | 000\-00\-0000;1;_
Short ZIP Code | 90504 | 00000;1;_
Long ZIP Code | 905040000 | 00000\-9999;1;_
Date | 062794 | !99/99/00;1;_
Long Time | 090515PM | !90:00:00>LL;1;_
Short Time | 1345 | !90:00;1;_

Microges2000

  • Global Moderator
  • Full Member
  • *****
  • Post: 130
  • Karma: +1/-0
    • Power of Nature
Re:Sintassi per la proprietà EditMask di un TDBEdit
« Risposta #1 il: Aprile 16, 2012, 02:34:28 pm »
Copio e incollo la guida per la "maschera". La guida è quella di Delphi ma Lazarus lo fa identico

Represents the mask that validates and formats user input.
 
Syntax


[Delphi] type TEditMask = AnsiString;


Description
TEditMask is a string that consists of three fields with semicolons separating them. The first part of the mask is the mask itself. The second part is the character that determines whether the literal characters of a mask are saved as part of the data. The third part of the mask is the character used to represent unentered characters in the mask.
 
These are the special characters used in the first field of the mask:
   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.
 

Any character that does not appear in the preceding table can appear in the first part of the mask as a literal character. Literal characters must be matched exactly in the edit control. They are inserted automatically, and the cursor skips over them during editing. The special mask characters can also appear as literal characters if preceded by a backslash character (\).
 
The second field of the mask is a single character that indicates whether literal characters from the mask should be included as part of the text for the edit control. For example, the mask for a telephone number with area code could be the following string:
 
(000)_000-0000;0;*
 
The 0 in the second field indicates that the Text property for the edit control would consist of the 10 digits that were entered, rather than the 14 characters that make up the telephone number as it appears in the edit control.
 
A 0 in the second field indicates that literals should not be included, any other character indicates that they should be included. The character that indicates whether literals should be included can be changed in the Edit Mask property editor, or programmatically by changing the MaskNoSave typed constant.
 
The third field of the mask is the character that appears in the edit control for blanks (characters that have not been entered). By default, this is the same as the character that stands for literal spaces. The two characters appear the same in an edit window. However, when a user edits the text in a masked edit control, the cursor selects each blank character in turn, and skips over the space character.
 Note:
 When working with multibyte character sets, each special mask character represents a single byte. To specify multi-byte characters using the L, l, A, a, C, or c specifiers, the mask characters must be duplicated as well. For example, LL would represent two single-byte alphabetic characters or a one double-byte character. Only single-byte literal characters are supported.
 
Il possibile lo abbiamo già fatto, l'impossibile lo stiamo facendo, per i miracoli ci stiamo attrezzando

Fabio

  • Full Member
  • ***
  • Post: 106
  • Karma: +0/-0
Re:Sintassi per la proprietà EditMask di un TDBEdit
« Risposta #2 il: Aprile 16, 2012, 03:01:07 pm »
Direi perfetta, grazie.

 

Recenti

How To

Utenti
  • Utenti in totale: 803
  • Latest: maXim.FI
Stats
  • Post in totale: 19170
  • Topic in totale: 2287
  • Online Today: 100
  • Online Ever: 900
  • (Gennaio 21, 2020, 08:17:49 pm)
Utenti Online
Users: 0
Guests: 104
Total: 104

Disclaimer:

Questo blog non rappresenta una testata giornalistica poiché viene aggiornato senza alcuna periodicità. Non può pertanto considerarsi un prodotto editoriale ai sensi della legge n. 62/2001.