Vcl.ExtDlgs.TOpenTextFileDialog.Encodings

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Encodings: TStrings read FEncodings write SetEncodings stored IsEncodingStored;

C++

__property System::Classes::TStrings* Encodings = {read=FEncodings, write=SetEncodings, stored=IsEncodingStored};

Properties

Type Visibility Source Unit Parent
property published
Vcl.ExtDlgs.pas
Vcl.ExtDlgs.hpp
Vcl.ExtDlgs TOpenTextFileDialog

Description

Represents the list of encodings that can be used to select the file encoding.

This property specifies the list of encodings from which the file's actual encoding can be selected. The encoding names are stored in a TStrings instance.

Note: Each encoding name can have an associated pointer to the corresponding TEncoding instance. Use AddObject to specify the pointer of the corresponding TEncoding:

  { build a TStrings collection of encodings - as a TStringList instance for example (encodings)  }
  encodings.AddObject('ASCII', TEncoding.ASCII); 

  { assign the encodings to the Encodings property of a TOpenTextFileDialog instance (openTextDialog) }
  openTextDialog.Encodings.Assign(encodings);

For more information, see the code examples.

Code Examples