MainMenuBottomCustomItem
interface cAlgo.API Since 5.4
DesktopCLICloud
Represents a bottom custom item in main menu.
Environment behaviour
CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.
Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.
Definition
public interface MainMenuBottomCustomItem
Namespace: cAlgo.API · Group: MainMenu · Implements: MainMenuBottomItem
Examples
var icon = new SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>");
MainMenuBottomCustomItem bottomItem = MainMenu.AddBottomItem("Open Report", icon);
bottomItem.Handler = () => Print("Generating report for {0}", Account.Number);
from System import Action
icon = SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='#2F4BFF' /></svg>")
bottomItem = api.MainMenu.AddBottomItem("Open Report", icon)
bottomItem.Handler = Action(lambda: api.Print(f"Generating report for {api.Account.Number}"))
Properties
| Name | Description |
|---|---|
HandlerDesktopCLICloudAction | Get / set handler of bottom item. |
NameDesktopCLICloudstring | Gets name of item. |