Navigation: ABC Library Reference > WindowManager > WindowManager Methods >====== AddHistoryField (add restorable control and field) ====== | |
AddHistoryField( control, field )
AddHistoryField | Adds a history field to the WindowManager object. |
control | An integer constant, variable, EQUATE, or expression containing the control number of the control whose contents to restore from the field. This is the field equate number of the control. |
field | An integer constant, variable, EQUATE, or expression containing the position of the field within the history file's record layout. The field is identified by its position in the FILE declaration. A value of one (1) indicates the first field, two (2) indicates the second field, etc. See WHAT and WHERE in the Language Reference for more information. |
The AddHistoryField method adds a history field to the WindowManager object. AddHistoryField associates a window control with its corresponding database field or column, so the WindowManager can restore the control's contents when the end user invokes the history key (or FrameBrowseControl ditto button).
Implementation:
The AddHistoryFile method names the file and record buffers from which fields are saved and restored. The AddHistoryField method associates specific fields from the history file with their corresponding WINDOW controls. The SaveHistory method saves a copy of the history fields. The RestoreField method restores the contents of a specific control.
Example:
ThisWindow.Init PROCEDURE()
CODE
!procedure code
SELF.HistoryKey = CtrlR
SELF.AddHistoryFile(CLI:Record,History::CLI:Record)
SELF.AddHistoryField(?CLI:Name,2)
SELF.AddHistoryField(?CLI:StateCode,3)
See Also: AddHistoryFile, HistoryKey, RestoreField, SaveHistory