Documentation

attachTo

attaches a context menu to a Webix component

void attachTo(object view);

Parameters

viewobject**ID** of the Webix view

See also

Example

webix.ui({
    view: "list",
  ...  // list config
});
 
webix.ui({
    view: "contextmenu",
  ...  // contextmenu config
});
 
$$("contextmenu1").attachTo($$("list1"));

Details

The component and context object are initialized in different Webix constructors (as seen above). The context menu isn't shown initially and becomes visible on right mouse click with the cursor pointed over the list area.

Back to top