10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

How You Can Build a Frame Dynamically6. After defining all of the individual items for the MenuGroup, the followingcode attaches the MenuGroup itself to the MenuBar object:top_menu.ParenMenuGroup = test_frame.StartMenu;The following code is the complete code that constructs both menu groupsthat belong to the menu bar:top_menu = MenuGroup.Create(); /* File Menu */top_menu.TextLabel = 'File';top_menu.Name = 'file_menu';test_menu = MenuButton.Create();/* Commit and close menu item */test_menu.Name = 'commit_menu';test_menu.TextLabel = 'Commit and Close';test_menu.SpeedKey = SK_CLOSE;test_menu.ParentMenuGroup = top_menu;/* Attach to File menu */test_menu = MenuButton.Create();/* Rollback and close menu item */test_menu.Name = 'rollback_menu';test_menu.TextLabel = 'Rollback and Close';test_menu.ParentMenuGroup = top_menu;/* Attach to File menu */top_menu.ParentMenuGroup = test_frame.StartMenu;/* Now, create the Edit menu */top_menu = MenuGroup.Create(); /* Edit Menu */top_menu.TextLabel = 'Edit';top_menu.Name = 'edit_menu';test_menu = MenuButton.Create();/* Delete menu item */test_menu.Name = 'delete_menu';test_menu.TextLabel = 'Delete and Next';test_menu.SpeedKey = SK_DELETE;test_menu.ParentMenuGroup = top_menu;/* Attach to Edit menu */test_menu = MenuButton.Create();/* Update menu item */test_menu.Name = 'update_menu';test_menu.TextLabel = 'Update and Next';test_menu.ParentMenuGroup = top_menu;/* * Attach to Edit menu */test_menu = MenuButton.Create();/* Next menu item */test_menu.Name = 'next_menu';test_menu.SpeedKey = SK_NEXT;test_menu.TextLabel = 'Next';test_menu.ParentMenuGroup = top_menu;/* Attach to Edit menu *//* Attach to Frame */top_menu.ParentMenuGroup = test_frame.StartMenu;For more information about the various types of menu objects, see theLanguage Reference <strong>Guide</strong> online help.Creating a Frame at Runtime 413

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!