User Tools

Site Tools


restore_restore_a_saved_menu_.htm
Navigation:  ABC Library Reference > PopupClass > PopupClass Methods >====== Restore (restore a saved menu) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

Restore( menu )

blk2blue.jpg

Restore Restores a menu saved by the PopupClass.Save method.
menu A string constant, variable, EQUATE, or expression containing the name of the menu to restore.

The Restore method restores a menu saved by the Save method. The Restore method restores all menu attributes that the PopupClass object knows about, including associated menu actions.

Implementation:

The Restore method requires an INIClass object. The Init method specifies the INIClass object.

Example:

PopupMgr  PopupClass                                   !declare PopupMgr object

INIMgr    INIClass                                     !declare INIMgr object

MenuChoices EQUATE('&Save Menu|&Restore Menu|-|&Close')!declare menu definition

CODE

PopupMgr.Init(INIMgr)                             !initialize PopupMgr object

PopupMgr.AddMenu(MenuChoices)                     !add Popup menu

ACCEPT

 CASE FIELD()

 OF ?Save

  CASE EVENT()

  OF EVENT:Accepted

   PopupMgr.Save('MyPopup')                       !save menu definition to INI

  END

 OF ?Restore

  CASE EVENT()

  OF EVENT:Accepted

   PopupMgr.Restore('MyPopup')                    !restore menu from INI

  END

 END

END

See Also:     Init, Save

restore_restore_a_saved_menu_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1