# Hide/show toolbar command icon or delete command from toolbar

**URL:** <https://forums.sketchup.com/t/hide-show-toolbar-command-icon-or-delete-command-from-toolbar/29712>\
**Category:** Ruby API\
**Created:** [August 30, 2016, 9:32pm UTC](https://forums.sketchup.com/t/hide-show-toolbar-command-icon-or-delete-command-from-toolbar/29712 "2016-08-30T21:32:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nekitu](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@nekitu](https://forums.sketchup.com/u/nekitu)\
**Post date:** [August 30, 2016, 9:32pm UTC](https://forums.sketchup.com/t/hide-show-toolbar-command-icon-or-delete-command-from-toolbar/29712/1 "2016-08-30T21:32:36Z")

</div>

I want to change the icon of a command button from a toolbar in Ruby. I don’t see any way to do it.  
Just want to change a “connected” icon to a “disconnected” icon on the same button (Command).  
Any ideas? thanks

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [August 30, 2016, 10:34pm UTC](https://forums.sketchup.com/t/hide-show-toolbar-command-icon-or-delete-command-from-toolbar/29712/2 "2016-08-30T22:34:52Z")

</div>

> [@nekitu](#):
>
> Just want to change a “connected” icon to a “disconnected” icon on the same button (Command)

This is not exposed to the Ruby API. (And I am not sure if it can be done on both platforms.)

Currently you must show both buttons side-by-side, and have only one toggled (checked) at a time. For buttons they appear to be pushed down when “checked”. So the user will click the button that is unchecked or in the “up” position (and then your code should uncheck the other button.)

---

<div class="post-metadata">

**Author:** ![nekitu](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@nekitu](https://forums.sketchup.com/u/nekitu)\
**Post date:** [August 30, 2016, 10:36pm UTC](https://forums.sketchup.com/t/hide-show-toolbar-command-icon-or-delete-command-from-toolbar/29712/3 "2016-08-30T22:36:09Z")

</div>

Ah thanks, the API is pretty minimalist (crippled). Will try two buttons…

---

<div class="post-metadata">

**Author:** ![Neil\_Burkholder](https://avatars.discourse-cdn.com/v4/letter/n/f4b2a3/32.png) [@Neil\_Burkholder](https://forums.sketchup.com/u/Neil_Burkholder)\
**Post date:** [September 29, 2020, 1:38pm UTC](https://forums.sketchup.com/t/hide-show-toolbar-command-icon-or-delete-command-from-toolbar/29712/4 "2020-09-29T13:38:05Z")

</div>

> <https://github.com/SketchUp/api-issue-tracker/issues/540>
>
> In the ruby api we can add commands to the menus, and toolbars, but there is no …way to remove them without restarting SketchUp. It would be nice to have a remove\_item method added to accompany to the add\_item methods that are already available. This would allow changing the toolbars and menus based on user preferences.
> 
> https://forums.sketchup.com/t/hide-show-toolbar-command-icon-or-delete-command-from-toolbar/29712
> 
> https://forums.sketchup.com/t/delete-item-toolbar/93968
