ContextMenu
TsgcHTMLComponent_ContextMenu — render a right-click Bootstrap dropdown menu scoped to a CSS selector, with icons, dividers, headers and server-routed actions, in Delphi, C++ Builder and .NET.
TsgcHTMLComponent_ContextMenu — render a right-click Bootstrap dropdown menu scoped to a CSS selector, with icons, dividers, headers and server-routed actions, in Delphi, C++ Builder and .NET.
Add entries to Items, scope right-clicks with TargetSelector, then read the HTML property; a right click positions and opens the menu.
TsgcHTMLComponent_ContextMenu
Bootstrap 5 dropdown-menu <ul> + binding script
Delphi, C++ Builder, .NET
Call Items.Add for each entry and set its Caption/Icon/DataAction (or Href), restrict right-clicks with TargetSelector, then read HTML.
The members you reach for most often.
Items holds the entries, each a TsgcHTMLContextMenuItem with Caption, Icon, Href, DataAction, Divider, Header and Disabled.
Items.Add appends an entry to the collection and returns it so you can set its properties.
Restricts the right-click capture to elements matching this CSS selector; left empty, every right click on the page opens the menu.
Clicking an entry with a DataAction sends it through window.sgcHTMX.send (the same channel forms use) and fires a sgcContextMenu:action DOM event.
Divider renders a separator line; Header renders a non-clickable section title instead of a link.
Sets the menu's element id explicitly; left empty, a unique id is generated and cached automatically.
| Online HelpFull API reference and usage guide for this component. | Open | |
| All sgcHTML ComponentsBrowse the full feature matrix of 80+ components. | Open | |
| Download Free TrialThe 30-day trial ships the 60.HTML demo projects. | Open | |
| PricingSingle, Team and Site licenses with full source code. | Open |