This procedure shows how to display the Genero context menu when the user right-clicks on the Genero application. It involves setting theme variables.
Overview
When you right-click on your GBC application, the context menu that displays can be either the browser context menu or the Genero context menu. By default, it is the browser context menu (see Figure 1).
Figure 1: Application with browser context menu
If you set the theme-disable-context-menu
variable to FALSE, the Genero context menu will display instead (see Figure 2).
Figure 2: Application with Genero context menu
Before you begin
This procedure assumes you are comfortable updating theme parts and themes. For the basic principles behind themes and theme parts, see Customization fundamentals. For instructions about adding and modifying themes and theme parts, see Manage themes.
Update the theme variable
-
Identify the theme part you plan to update. If you are creating a new theme part, prepare the directory.
-
In the theme part, open the
theme.scss.json
file in a text editor. -
To disable the browser context menu and enable the Genero context menu, set the
theme-disable-context-menu
tofalse
:// in theme.scss.json { … "theme-disable-context-menu": false, … }
-
If you created a new theme part, add it to one or more themes.
Compile
After updating theme.scss.json
with the theme variable and ensuring the theme part is assigned to one or more themes, you compile your customization.
$ gbc build --customization=<customization_project_dir>
Test
Test that your changes work as expected. Open your application and right-click on the screen.
TIP: You may need to use CTRL + F5 to clear the browser cache before you see your changes.
If your tests do not behave as expected, ensure you are using your newly-compiled custom GBC. Depending on your development environment, you may need to package and deploy a custom GBC client. For information on which customization and theme you are using, see Customization and Theme Selection.