Properties, General


Mode Current view mode.
Possible values:
  • vmodeText: Text mode
  • vmodeBinary: Binary mode (fixed line length)
  • vmodeHex: Hex mode
  • vmodeUnicode: Unicode and Unicode/Hex modes
  • vmodeRTF: RTF/UTF-8 mode
  • vmodeMedia: Image mode
  • vmodeWeb: Internet mode
  • vmodeWLX: Plugins mode
  • vmodeOffice: MS Office mode
Notes:
  • To activate the combined Unicode/Hex mode, user should call the Unicode mode twice.
  • Plugins mode is available only when "WLX" define is uncommented in ATViewerOptions.inc file.
  • MS Office mode is available only when "MSO" define is uncommented in ATViewerOptions.inc file. It also needs dsoframer.dll, with registered state, at runtime.
  • UTF-8 encoded texts can be shown only under Windows 2000/XP+. This is due to a limitation of MS RichEdit control.
ModeDetect Enables mode auto-detection on file opening.
File type may be determined by extension or sometimes by contents (extension has higher priority than contents). The global variable ATViewerOptions contains extensions lists for different modes, it's declared as record:
  type
    TATViewerGlobalOptions = record
      ExtText: string; //Text mode extensions
      ExtRTF: string; //RTF mode ext
      ExtImages: string; //Images ext
      ExtInet: string; //Internet mode ext
      ExtImagesUse: Boolean; //Enables ExtImages field
      ExtInetUse: Boolean; //Enables ExtInet field
    end;
Note:
  • For Plugins mode the different plugin detection scheme is used: matched plugin is determined first by plugin detect-string, or, if plugin detect-string is empty, the first plugin that can load given file is shown. Plugins mode can have higher or lower priority than internal viewers: see PluginsHighPriority property.
ModesDisabledForDetect
ModeUndetected
ModeUndetectedCfm
Mode detection options (used when ModeDetect = True):
  • Set of modes that won't be auto-detected.
  • Default mode that is set when nothing is detected.
  • Allows to show confirmation (yellow panel at the top) for unknown file types. When user clicks this message, file is shown in ModeUndetected mode.
FileName
FileSize
FileTime (public, read-only)
Properties of currently opened file or folder:
  • Name (WideString)
  • Size (Int64)
  • Time (TFileTime record)
Note:
  • To convert FileTime value to a readable string, you may use, for example, the FormatFileTime function from "Universal Viewer" demo.
IsFocused Enables control focusing on file opening.
Note:
  • Set to True if you use component as main form control (e.g. you have something like Universal Viewer demo). Set to False if you use component as additional optional control (e.g. you have something like Browser demo).
BorderStyle (inherited)
BorderStyleInner
Border styles:
  • Border style of entire TATViewer control.
  • Border style of embedded controls (TATBinHex, TWebBrowser etc).
Note:
  • Set both BorderStyle and BorderStyleInner to bsNone to hide border completely.
PosPercent
PosOffset
PosLine
(public)
Current scroll position:
  • Relative position in percents (%).
    Valid in text, Internet, Plugins modes.
  • Absolute offset (Int64, 0-based).
    Valid in text, Internet modes.
  • Line number (1-based, 0 if line number is not found).
    Valid in text modes only.
Notes for line numbers in ATBinHex control:
  • Lines are separated by: #13#10, #13, #10.
  • Line numbers are counted only for the first portion of file (see TextGutterLines*).
  • Line numbers are counted for the "current" copy of file, they may be incorrect if file was changed (and not reloaded) since the last display.
SearchStarted
SearchFinished
(public, read-only)
Search state flags:
  • Flag that is set after FindFirst method was called once.
  • Flag indicating that FindFirst / FindNext methods returned False on last call.
MarginLeft
MarginTop
MarginRight
MarginBottom
(public)
Printing margins.
Currently in mm.
ParentWnd (public, write-only) Used in ActiveX context. Must be set to parent window's handle.