# ToolStrip

Adds supports for \[ System.Windows.Forms.ToolStrip]\(<https://msdn.microsoft.com/en-us/library/system.windows.forms.toolstrip(v=vs.110).aspx>)

## Implementation  Details:

> **Component Selector:** 'wm-toolstrip'
>
> **Kendo UI Component:** [Kendo Jquery Menu](https://demos.telerik.com/kendo-ui/menu/events)

## Class inheritance

ToolStripComponent extends [ControlComponent](/webmap/general/frontend/documentation/winforms-angular-components/web-components/base-components/control-component.md).

## PME Support

### Properties

| Property                  | Get/Set | Notify Changes | Details                                                                                                                                                                         |
| ------------------------- | ------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| items: any                | Yes     | No             | Used to return/set the datasource value for the component.                                                                                                                      |
| defaultDataUrl: string    | No      | No             | Default URL to call the API and get the data.                                                                                                                                   |
| url: string               | Get     | No             | Returns the value of the dataUrl if was set, overwise return the defaultDataUrl.                                                                                                |
| datasource: string        | No      | No             | Saves the data that will be use in the menu.                                                                                                                                    |
| currentItem: any          | No      | No             | Used to store the item that was clicked.                                                                                                                                        |
| updateDataUrl: string     | Get     | No             | Gets the property from the model when you want to use other url to fetch the data.                                                                                              |
| text: string              | Yes     | Yes            | Inherited from ControlComponent [see ControlComponent](/webmap/general/frontend/documentation/winforms-angular-components/web-components/base-components/control-component.md). |
| name: string              | Yes     | No             | Inherited from ControlComponent [see ControlComponent](/webmap/general/frontend/documentation/winforms-angular-components/web-components/base-components/control-component.md). |
| enabled: boolean          | Yes     | No             | Inherited from ControlComponent [see ControlComponent](/webmap/general/frontend/documentation/winforms-angular-components/web-components/base-components/control-component.md). |
| visible: boolean          | Yes     | No             | Inherited from ControlComponent [see ControlComponent](/webmap/general/frontend/documentation/winforms-angular-components/web-components/base-components/control-component.md). |
| TextImageRelation: Number | No      | No             | Used in ToolStripLabel and ToolStripButton items to set the image position.                                                                                                     |

### Methods

| Method               | Supported | Details                                                                   |
| -------------------- | --------- | ------------------------------------------------------------------------- |
| ngOnInit: void       | Yes       | Used to call the `applyFetchdata` function.                               |
| applyFetchdata: void | Yes       | Requests the new data from the web Service and update the property items. |

### Events

| Event       | Supported | Parameter       | Details                                                                                                                             |
| ----------- | --------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Click       | Yes       | **$event**: any | Trigger Click event. ***$event*** parameter is optional and the ***$event***  object vary depending on the type of DOM event.       |
| ItemClicked | Yes       | **$event**: any | Trigger ItemClicked event. ***$event*** parameter is optional and the ***$event***  object vary depending on the type of DOM event. |

### Items

| Item               | Supported | Details                            | Supported Properties |
| ------------------ | --------- | ---------------------------------- | -------------------- |
| ToolStripLabel     | Yes       | Click Event                        | TextImageRelation    |
| ToolStripComboBox  | Yes       | Click, SelectedIndexChanged Events |                      |
| ToolStripSeparator | Yes       |                                    |                      |
| ToolStripButton    | Yes       | Click Event                        | TextImageRelation    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gapvelocity.ai/webmap/general/frontend/documentation/winforms-angular-components/web-components/kendoui-components/toolstrip.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
