# How to change a custom toolbar button icon when clicked?

**URL:** <https://forums.unrealengine.com/t/how-to-change-a-custom-toolbar-button-icon-when-clicked/438904>\
**Category:** UI\
**Tags:** button, style, unreal-engine, editor, slate, question\
**Created:** [December 5, 2018, 11:18am UTC](https://forums.unrealengine.com/t/how-to-change-a-custom-toolbar-button-icon-when-clicked/438904 "2018-12-05T11:18:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f2172349](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f2172349](https://forums.unrealengine.com/u/anonymous_user_f2172349)\
**Post date:** [December 5, 2018, 11:18am UTC](https://forums.unrealengine.com/t/how-to-change-a-custom-toolbar-button-icon-when-clicked/438904/1 "2018-12-05T11:18:22Z")

</div>

I added a custom button to the toolbar. And I was wondering whether it’d be possible to change the button’s icon when clicked. UE4’s buttons don’t do this and I found some hardcoded values set, e.g. from NiagaraEditorStyle.cpp

```
Style->Set("Niagara.CompileStatus.Warning", new IMAGE_BRUSH("Icons/CompileStatus_Warning", Icon40x40));
Style->Set("Niagara.CompileStatus.Warning.Small", new IMAGE_BRUSH("Icons/CompileStatus_Warning", Icon20x20));
Style->Set("Niagara.Asset.ReimportAsset.Needed", new IMAGE_BRUSH("Icons/icon_Reimport_Needed_40x", Icon40x40));
Style->Set("Niagara.Asset.ReimportAsset.Default", new IMAGE_BRUSH("Icons/icon_Reimport_40x", Icon40x40));

```

Note the Small, Default, Needed keywords. I wasn’t able to find where these are used or accessed. Maybe there is a .Hovered, .Clicked option? Where are these values being used?
