Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

OnGetIniData event

Project: Window State Components.

Unit: PJWdwState.

Class: TPJWdwState

Applies to: ~>5.0

  TPJWdwStateGetIniData = procedure(
    var AIniFilename, ASection: string
  ) of object;

property OnGetIniData: TPJWdwStateGetIniData;


OnGetIniData allows the user to change the name of the ini file and the section within it where window information is stored.

The event is triggered in the following circumstances:

The name of the ini file and the section within it are passed as var parameters to the event handler, allowing the user to change the values, and hence the location where the window data is recorded. The values passed to the event handler are the same as those of the IniFileName and Section properties.

Changing the values of the event’s parameters does not change the value of the related properties.

The purpose of the event is to enable the AutoSaveRestore property to be used without setting the IniFileName and Section properties at design time - i.e. handling the event allows either or both of the default IniFileName and Section names to be overridden.

TPJWdwState’s behaviour when the event handler returns depends on the values of the parameters it returns. This behaviour changed at v5.5: