ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Image control
  • Overview
  • How to?
  • Allowing users to open a context menu on images
  • Configuring the image context menu
  • Programming
  • Text of context menu options
  • Protecting the export options
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
AAF: Context menu of Image controls
Overview
A context menu is available for Image controls. This menu is used to:
  • modify the image found in the control (via a mini-bar or an image editor).
  • copy, save and display the selected image in high-quality mode.
Context menu with Image control editing
Remark: Some menu options may be followed by a star or a padlock to indicate that a password is required to perform the requested option.
How to?

Allowing users to open a context menu on images

To allow users to open a context menu on images:
  1. Open the description of the Image control.
  2. In the "Details" tab, check "This image is a clickable area".
  3. In the "Image options (for the user)" option, select type of context menu to display:
    Description window of Image controls
    • "No menu": No context menu will displayed for the control.
    • "Simple menu (copy, save as, etc.)": The context menu allows copying, saving and displaying the selected image in high-quality mode.
      Simple context menu of Image controls
    • "Simple menu + integrated edit (mini bar)": In addition to the simple menu, the context menu includes the option "Edit the image". This option is used to display a toolbar above the Image control in order to modify the image displayed in the control. A toolbar option is used to open the full image editor.
      Editing the image via the mini-bar
    • "Simple menu + integrated edit (entire editor)": In addition to the simple menu, the context menu includes the option "Edit the image". This option is used to display a full image editor allowing the user to modify the image displayed in the control.
      Editing the image via the stand-alone editor
    • "Simple menu + display only (blocking window)": In addition to the simple menu, the context menu includes the option "Edit the image". This option opens an image editor that only allows you to view and print the image. This image editor blocks the main window: the user must close the image editor to return to the window that contains the original image.
    • "Simple menu + display only (non-blocking window)": In addition to the simple menu, the context menu includes the option "Edit the image". This option opens an image editor that only allows you to view and print the image. This image editor does not block the main window: the user does not have close the image editor to return to the window that contains the original image.
  4. Validate.

Configuring the image context menu

If the simple AAF context menu has been enabled for the Image control, you can configure it. To configure the context menu of the Image control, you must:
  1. Display the description window of Image control.
  2. Select the "UI" tab.
  3. Choose the desired menu in the "Context menu" combo box. You can:
    • "Display the AAF menu (System)": In this case, the automatic menu of Image control will be displayed. For more details on how to configure this menu, see Configuring the AAF menu.
    • "Add a context menu": If this option is checked, you can select the custom context menu to be displayed.
      Configuring the AAF menu
Remarks:
  • If both options are checked, the custom context menu can be added before or after the AAF menu.
  • If no option is selected, no context menu will be selected. The <Disabled> option will be displayed in the description window.
  • The ContextMenu property is also used to remove the AAF-specific context menu and restore the standard Windows menu for a given control.
  • If a binary content has been assigned to the image (via fLoadText or a binary memo for example), the "High Quality" option will not be available in the context menu.
  • The "Edit image" option is configured via the "Details" tab of the Image control.
Programming

Text of context menu options

The text of the options in the AAF context menu (copy, save as, etc.) can be modified via AAFChangeCaption.

Protecting the export options

The Image control proposes export options: "Copy", "Save as", "Open with default program", etc.
AAFExportSecurity is used to secure these features:
  • by requesting a password before performing the export. In this case, a lock or a star is displayed in the option caption.
  • by forbidding the export. In this case, the corresponding options will not be displayed anymore.
Minimum version required
  • Version 12
Comments
Click [Add] to post a comment

Last update: 05/26/2023

Send a report | Local help