| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > WindowManager > WindowManager Methods >====== AddHistoryFile (add restorable history file) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[addhistoryfield add restorable control and field .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[additem program the windowmanager object .htm|{{btn_next_n.gif|Next page}}]] | | || **AddHistoryFile( **//record buffer, save buffer //**)** {{blk2blue.jpg|blk2blue.jpg}} | **AddHistoryFile** | Adds a history file to the WindowManager object. | | //record buffer// | The label of the history file's RECORD. | | //save buffer// | The label of a STATIC variable declared LIKE(//record buffer//). The WindowManager saves to and restores from this variable. | The **AddHistoryFile **method adds a history file to the WindowManager object. AddHistoryFile sets the file's record buffer and a corresponding save buffer so the WindowManager can restore from the save buffer 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 add restorable history file .htm|AddHistoryFile]], [[historykey restore field key .htm|HistoryKey]], [[restorefield restore field to last saved value .htm|RestoreField]], [[savehistory save history fields for later restoration .htm|SaveHistory]]