# Adding a Custom Icon to a Instantiated Toolbar 

**URL:** <https://forum.xojo.com/t/adding-a-custom-icon-to-a-instantiated-toolbar/26748>\
**Category:** iOS\
**Created:** [September 18, 2015, 6:39pm UTC](https://forum.xojo.com/t/adding-a-custom-icon-to-a-instantiated-toolbar/26748 "2015-09-18T18:39:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_O\_Brien](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_o_brien/32/452_2.png) [@Chris\_O\_Brien](https://forum.xojo.com/u/Chris_O_Brien)\
**Post date:** [September 18, 2015, 6:39pm UTC](https://forum.xojo.com/t/adding-a-custom-icon-to-a-instantiated-toolbar/26748/1 "2015-09-18T18:39:51Z")

</div>

Hi

I have a ToolBar added to a View .

I’m able to add Text or SystemIcons ok, but is it possible to add a custom image?

Thanks

---

<div class="post-metadata">

**Author:** ![Paul\_Lefebvre](https://forum.xojo.com/user_avatar/forum.xojo.com/paul_lefebvre/32/3152_2.png) [@Paul\_Lefebvre](https://forum.xojo.com/u/Paul_Lefebvre)\
**Post date:** [September 18, 2015, 7:03pm UTC](https://forum.xojo.com/t/adding-a-custom-icon-to-a-instantiated-toolbar/26748/2 "2015-09-18T19:03:07Z")

</div>

Yes, use a method such as [iOSToolbutton.NewPlain](http://developer.xojo.com/iostoolbutton%24NewPlain) and pass in the iOSImage you want to use.

---

<div class="post-metadata">

**Author:** ![Chris\_O\_Brien](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_o_brien/32/452_2.png) [@Chris\_O\_Brien](https://forum.xojo.com/u/Chris_O_Brien)\
**Post date:** [September 18, 2015, 7:08pm UTC](https://forum.xojo.com/t/adding-a-custom-icon-to-a-instantiated-toolbar/26748/3 "2015-09-18T19:08:10Z")

</div>

Thanks very much Paul - Yes, I tried that with an image icon that paints fine in a canvas, but seems to paint in iOS blue without the detail (the alpha channel looks like the only correct detail that is transferred) - The seems to come in twice the size that of the canvas paint/tab icon. The image is 64x64 png.

Any ideas? Thanks again

---

<div class="post-metadata">

**Author:** ![Paul\_Lefebvre](https://forum.xojo.com/user_avatar/forum.xojo.com/paul_lefebvre/32/3152_2.png) [@Paul\_Lefebvre](https://forum.xojo.com/u/Paul_Lefebvre)\
**Post date:** [September 18, 2015, 7:55pm UTC](https://forum.xojo.com/t/adding-a-custom-icon-to-a-instantiated-toolbar/26748/4 "2015-09-18T19:55:02Z")

</div>

That is correct. As of iOS 7, iOS only uses the alpha channel and only shows blue.

The iOS Human Interface Guidelines have more information:

[https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/MobileHIG/BarIcons.html#//apple\_ref/doc/uid/TP40006556-CH21-SW1](https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/MobileHIG/BarIcons.html#//apple_ref/doc/uid/TP40006556-CH21-SW1)

[https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html](https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html)

---

<div class="post-metadata">

**Author:** ![Chris\_O\_Brien](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_o_brien/32/452_2.png) [@Chris\_O\_Brien](https://forum.xojo.com/u/Chris_O_Brien)\
**Post date:** [September 18, 2015, 8:08pm UTC](https://forum.xojo.com/t/adding-a-custom-icon-to-a-instantiated-toolbar/26748/5 "2015-09-18T20:08:17Z")

</div>

Leave out the background. Very good. Thanks again Paul

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:57pm UTC](https://forum.xojo.com/t/adding-a-custom-icon-to-a-instantiated-toolbar/26748/6 "2020-10-29T17:57:47Z")

</div>


