# PluginToolbarButton

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/PluginToolbarButton/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/PluginToolbarButton

A button on a [`PluginToolbar`](https://rapi.sleaze.dev/classes/PluginToolbar.md) in the Studio ribbon, created by [`PluginToolbar:CreateButton()`](https://rapi.sleaze.dev/classes/PluginToolbar.md), that fires [`Click`](https://rapi.sleaze.dev/classes/PluginToolbarButton.md) when pressed.

## Properties

### ClickableWhenViewportHidden

```luau
PluginToolbarButton.ClickableWhenViewportHidden: boolean
```

- Tags: Not replicated, Load only

Determines whether the button can be clicked when the 3D viewport is hidden, such as when a [`Script`](https://rapi.sleaze.dev/classes/Script.md) is being edited in another tab.

### Enabled

```luau
PluginToolbarButton.Enabled: boolean
```

- Tags: Not replicated, Load only

Determines whether the button is clickable in general.

### Icon

```luau
PluginToolbarButton.Icon: string
```

- Tags: Not replicated, Load only

Determines what icon should represent the button.

### IconContent

```luau
PluginToolbarButton.IconContent: Content
```

- Tags: Not replicated, Plugin security, Load only

The content of the image used as the button's icon in the toolbar. Only supports asset URIs.

## Methods

### SetActive

```luau
PluginToolbarButton:SetActive(active: boolean)
```

- Tags: Plugin security

Sets the state of the plugin button.

Parameters:

- `active`: Whether to set the button to its active, pressed state (`true`) or its inactive state (`false`).

### SetDropdownActive

```luau
PluginToolbarButton:SetDropdownActive(active: boolean)
```

- Tags: Roblox script security

## Events

### Click

```luau
PluginToolbarButton.Click: RBXScriptSignal<()>
```

- Tags: Plugin security

Fires when the user presses and releases their cursor on the button.

### DropdownClick

```luau
PluginToolbarButton.DropdownClick: RBXScriptSignal<()>
```

- Tags: Roblox script security

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
