[Overview][Resource strings][Classes][Index] Reference for unit 'stringtableresource' (#fcl-res)

TStringTableResource

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

String table resource type

Declaration

Source position: stringtableresource.pp line 39

type TStringTableResource = class(TAbstractResource)

protected

  function GetType; override;

  function GetName; override;

  function ChangeDescTypeAllowed(); override;

  function ChangeDescValueAllowed(); override;

  procedure NotifyResourcesLoaded; override;

public

  constructor Create();

  

Creates a new string table resource

  destructor Destroy; override;

  procedure UpdateRawData; override;

  property FirstID: Word; [rw]

  

The ID of first the string contained in the string table

  property LastID: Word; [r]

  

The ID of the last string contained in the string table

  property Count: Integer; [r]

  

The number of strings contained in the string table

  property Strings []: string; default; [rw]

  

Indexed array of strings in the string table

end;

Inheritance

TStringTableResource

  

String table resource type

|

TAbstractResource

  

Base abstract resource class

|

TObject

Description

This class represents a resource of type RT_STRING.

A string table is a resource containing strings, identified by an integer id in the range 0-65535. A string table contains exactly 16 strings, and its name is an ID in the range 1-4096, determined by the highest 12 bits of the strings ID it contains, plus one. That is, a string table with 1 as name holds strings with IDs from 0 to 15, string table 2 contains strings with IDs from 16 to 31 and so on. There is no difference between an empty string and a non-existant string.

For these reasons, it is not possible to set the name of a string table: it is autogenerated from the value of FirstID property. Moreover, Count property is always 16.

Strings property is provided to access and modify individual strings.

Remark: This class doesn't allow its type to be changed to anything else than RT_BITMAP. Its name can't be changed too. Attempts to do so result in a EResourceDescChangeNotAllowedException.

Documentation generated on: Jun 23 2021