Properties, Text-related


TextEncoding Text encoding.
It can be used in Text, Binary, Hex and Plugins modes.
Possible values:
  • vencANSI: ANSI encoding (locale dependent)
  • vencOEM: OEM encoding (locale dependent)
  • vencEBCDIC: IBM EBCDIC US encoding
  • vencKOI8: KOI8-R encoding
  • vencISO: ISO encoding (locale dependent)
  • vencMac: Macintosh encoding (locale dependent)
  • plus many others, see the complete list in ATxCodepages.pas.
Notes:
  • For Plugins mode only ANSI and OEM encodings are available.
  • For Text/Binary/Hex modes ANSI, OEM, EBCDIC, KOI8, ISO, Mac encodings are always available.
  • EBCDIC, KOI8, ISO, Mac encodings are used via MultiByteToWideChar API, if possible. But if they are not installed on OS (for example, on Win9x), then the hardcoded codepages are used.
  • All other encodings are used via MultiByteToWideChar API, they are available only when installed on OS.
TextEncodingName (public, read-only) Name of current text encoding.
Note:
  • It can be read in all text modes, even in Unicode and RTF/UTF-8 modes. In Unicode mode is will show "UTF-16 LE" or "UTF-16 BE". In RTF/UTF-8 mode it will show "RTF" or "UTF-8".
TextDetect
TextDetectOEM
TextDetectSize
TextDetectLimit
Text auto-detection options.
Text, Unicode and UTF-8 files can be detected.
  • TextDetect: enables auto-detection.
  • TextDetectOEM: enables also detection of OEM codepage.
  • TextDetectSize: size of block (in Kb) read to detect text.
  • TextDetectLimit: maximal file size (in Kb) allowed for detection, 0: don't limit.
TextWrap Enables word wrap.
TextWidth
TextWidthHex
TextWidthUHex
Width of text in fixed-length modes:
  • TextWidth: Binary mode.
  • TextWidthHex: Hex mode.
  • TextWidthUHex: Unicode/Hex mode.
TextWidthFit
TextWidthFitHex
TextWidthFitUHex
Enables width auto-fit in fixed-length modes.
  • TextWidthFit: Binary mode.
  • TextWidthFitHex: Hex mode.
  • TextWidthFitUHex: Unicode/Hex mode.
Note:
  • These properties work correctly only with monospaced fonts. With fonts of variable width you can get text partially not fitting in the control.
TextSearchIndentVert
TextSearchIndentHorz
Text indents, used when text is highlighted with successfull FindText / FindNext methods call.
  • TextSearchIndentVert: number of lines above selection.
  • TextSearchIndentHorz: average number of chars lefter than selection.
TextTabSize Tabulation (#9) size.
TextOemSpecial Enables usage of special OEM font (when TextEncoding = vencOEM).
Note:
  • This property should be set to True only on older Win9x systems. NT systems support displaying of OEM text in Unicode (using MultiByteToWideChar API and Unicode fonts), so special OEM font is not needed.
TextNonPrintable Enables displaying of non-printable characters.
Note:
  • When enabled, spaces are shown as small dots, tabs (#9) are shown as "right arrows", and line ends are shown as "paragraphs".
TextUrlHilight Enables URL/mail highlighting.
Note:
  • For this option to work the RegEx library must be compiled in. See ATBinHexOptions.inc file: "REGEX" and "SEARCH" defines must be enabled.
TextGutter
TextGutterLines
TextGutterLinesBufSize
TextGutterLinesCount
TextGutterLinesStep
TextGutterLinesExtUse
TextGutterLinesExtList
Gutter (vertical bar on the left) options:
  • Enables gutter.
  • Enables line numbers on gutter (in var length modes).
  • Buffer size for line numbers. Lines below this buffer are not counted. Recommended is ~300Kb .. 1Mb.
  • Maximal count of line numbers shown.
  • Step for line numbers. Minimal is 1, means "show numbers for all lines".
  • Enables lines numbers only for specified file extensions.
  • List of file extensions for the previous option. It can be, for example, 'c,cpp,h,hpp,pas,dpr'.
TextFont
TextFontOEM
TextFontFooter
TextFontGutter
Fonts:
  • Text font.
  • OEM text font. Used in Text/Binary/Hex modes when (TextEncoding = vEncOEM) and (TextOemSpecial = True).
  • Font for printing footer.
  • Font for gutter line numbers.
TextColor
TextColorGutter
TextColorURL
TextColorHi
TextColorHex
TextColorHex2
TextColorHexBack
TextColorLines
TextColorError
Colors of:
  • Text background
  • Gutter
  • URLs
  • Search highlight color (for option asoShowAll)
  • Hex digits (even)
  • Hex digits (odd)
  • Hex digits background
  • Hex mode vertical lines
  • Error messages (displayed when read error occurs)
TextAutoCopy Enables auto-copying to Clipboard at the end of text selection operation.
TextAutoReload
TextAutoReloadBeep
TextAutoReloadFollowTail
File auto-reloading options:
  • TextAutoReload: enables auto-reload.
  • TextAutoReloadBeep: enables beep on reload.
  • TextAutoReloadFollowTail: enables repositioning at the file end, if previous view position was also at the end.
TextPopupCommands Set of commands visible in the popup (right-click) menu.
Commands available:
  • vpCmdCopy: Copy selection to Clipboard.
  • vpCmdCopyHex: Copy selection in hex form in Hex mode.
  • vpCmdSelectLine: Select current line.
  • vpCmdSelectAll: Select all text.
  • vpCmdEncMenu: Show encodings menu.
TextPopupCaption[AIndex: TATPopupCommand]
(public, write-only)
Captions of popup (right-click) menu items.
For possible values of AIndex see TextPopupCommands.
TextMaxLengths[AIndex: TATBinHexMode] (public) Maximal line lengths.
These values are for all view modes of ATBinHex control. They set internal values that define the maximal length of a single string in a file. Values are 300 by default.
For example, you may set TextMaxLengths[vbmodeText] to 1000 if user needs to work with strings of length 1000 in Text mode.
Notes:
  • Larger values increase size of memory buffer for a file, so slow down file reading.
  • Values are applied after file reopening: after calling Open, Reload methods or after changing Mode property.
TextMaxClipboardDataSizeMb Maximal data size (in Mb), for copying to Clipboard.
Default value is 16 (Mb), which prevents visual "hanging" when too large block is selected accidentally before copying.
TextSelStart (public)
TextSelLength (public)
TextSelText (public, read-only)
TextSelTextW (public, read-only)
TextSelTextShort (public, read-only)
TextSelTextShortW (public, read-only)
Current selection properties:
  • TextSelStart: Selection start (Int64, 0-based).
  • TextSelLength: Selection length (Int64).
  • TextSelText: Selection text (AnsiString) in non-Unicode modes.
  • TextSelTextW: Selection text (WideString) in Unicode mode.
  • TextSelTextShort: Same as TextSelText, but limited to the length of 256 chars.
  • TextSelTextShortW: Same as TextSelTextW, but limited to the length of 256 chars.
Note:
  • You should call TextSelText/TextSelTextW inside try...except block, because when selection is too big, exception is generated.
BinHex (public, read-only) Embedded text control object (of type TATBinHex).
You can use this object to access advanced text-related properties not published in TATViewer.