(TBarcodeFmx2D_Code16K)
Specifies the initial mode for Code 16K barcode symbology.
type
{ Defined in the pfmxCode16K unit }
TCode16K_EncodeMode = (emAuto, emModeA, emModeB, emModeC, emModeB_FNC1, emModeC_FNC1, emModeC_Shift1B, emModeC_Shift2B, emMode_Extended);
property InitialMode: TCode16K_EncodeMode;
The property specifies the initial mode for Code 16K barcode symbology. The initial mode indicates the initial code set and may also represent an implied leading FNC1 character or implied leading SHIFT B character as shown in following table. The code set will be automatically switched if a character is encountered that cannot be encoded by current code set. And Implied characters function as if they were actual symbol characters but don not occupy any space.
There are seven kinds of initial mode, from 0 to 6, and a kind of extended data length mode. The initial mode values from emCodeA to emExtended, corresponding to these modes, are defined in the pfmxCode16K unit. These modes and their values are listed in following table:
Initial Mode | Value | Initial code set | Implied character | Description |
---|---|---|---|---|
0 | emCodeA | A | (None) | The code set will be automatically switched if another code set character is encountered. |
1 | emCodeB | B | (None) | |
2 | emCodeC | C | (None) | |
3 | emCodeB_FNC1 | B | FNC1 | |
4 | emCodeC_FNC1 | C | FNC1 | |
5 | emCodeC_Shift1B | C | SHIFT B | First character excepting the message append block (if exists), must be code set B character (ASCII 32 - ASCII 127), otherwise an OnInvalidChar or OnInvalidDataChar event will occur. The code set will be automatically switched if another code set character is encountered. |
6 | emCodeC_Shift2B | C | Double SHIFT B | First two characters excepting the message append block (if exists), must be code set B characters (ASCII 32 - ASCII 127), otherwise an OnInvalidChar or OnInvalidDataChar event will occur. The code set will be automatically switched if another code set character is encountered. |
Extended data length mode | emMode_Extended | B | None | Indicates to create a Code 16K barcode symbol in extended data length mode. An extended data length mode block is required, and it should be placed at beginning of barcode text, otherwiset the OnInvalidChar or OnInvalidDataChar event will occur. See also the "Extended data length mode" section in the "TBarcodeFmx2D_Code16K" article. |
The property can be one of these values: emModeA, emModeB, emModeC, emModeB_FNC1, emModeC_FNC1, emModeC_Shift1B, emModeC_Shift2B, and emMode_Extended, corresponding to the initial modes 0 to 6, and the extended data length mode. In this case, it specifies the factual initial mode shown in table above.
Also, the InitialMode property can be set to emAuto (defined in the pfmxCode16K unit), in this case, one of values from emCodeA to emModeC_Shift2B, corresponding to the initial modes 0 to 6 shown in table above will be selected automatically, depending on the barcode text, in order to minimize the symbol size.
You can always use the CurrentMode property to get the factual initial mode.
See also the "Initial modes" section in the "TBarcodeFmx2D_Code16K" article.