# problem with drawCautionIcon

**URL:** <https://forum.xojo.com/t/problem-with-drawcautionicon/32033>\
**Category:** macOS\
**Created:** [June 18, 2016, 4:35am UTC](https://forum.xojo.com/t/problem-with-drawcautionicon/32033 "2016-06-18T04:35:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlo\_Rubini](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/94ad74/32.png) [@Carlo\_Rubini](https://forum.xojo.com/u/Carlo_Rubini)\
**Post date:** [June 18, 2016, 4:35am UTC](https://forum.xojo.com/t/problem-with-drawcautionicon/32033/1 "2016-06-18T04:35:41Z")

</div>

Hello,  
I have a canvas (40x40) into which I want to draw a cautionIcon.  
according to the the docs, this code in the paint event of the canvas should work:  
g.drawCautionIcon(0,0)  
yet nothing gets drawn, both with retina enabled and disabled.

So I tried:  
g.DrawRect 0,0,me.Width,me.Heigh)//to see where the icon will actually be drawn  
dim p as new Picture(me.Width,me.Height)  
p.Graphics.DrawCautionIcon(0,0)//noteIcon, stopIcon  
g.DrawPicture p,0,0

Now the icon is drawn, but at the bottom of the canvas, where only more or less half of it can be seen.  
The same happens if I create a new picture and assign it as backdrop to the canvas.

Pretty sure I’m missing something. Suggestions will be welcome. Thanks.

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [June 18, 2016, 11:28pm UTC](https://forum.xojo.com/t/problem-with-drawcautionicon/32033/2 "2016-06-18T23:28:17Z")

</div>

There’s a feedback report for this. If you have the Retina Kit, you can replace this function.

---

<div class="post-metadata">

**Author:** ![Norman\_P](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@Norman\_P](https://forum.xojo.com/u/Norman_P)\
**Post date:** [June 19, 2016, 12:42am UTC](https://forum.xojo.com/t/problem-with-drawcautionicon/32033/3 "2016-06-19T00:42:17Z")

</div>

which version are you using ?  
2016r1 and 1.1 have a bug in how they handle this  
From what I can tell it seems it should be fixed for a future release

---

<div class="post-metadata">

**Author:** ![Carlo\_Rubini](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/94ad74/32.png) [@Carlo\_Rubini](https://forum.xojo.com/u/Carlo_Rubini)\
**Post date:** [June 19, 2016, 12:55am UTC](https://forum.xojo.com/t/problem-with-drawcautionicon/32033/4 "2016-06-19T00:55:12Z")

</div>

The last version: 2016r1.1  
Happy to know that it should be fixed.  
Thank you.

---

<div class="post-metadata">

**Author:** ![Norman\_P](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@Norman\_P](https://forum.xojo.com/u/Norman_P)\
**Post date:** [June 19, 2016, 12:59am UTC](https://forum.xojo.com/t/problem-with-drawcautionicon/32033/5 "2016-06-19T00:59:10Z")

</div>

It seems to  
Not sure which report Sam is referring to though  
I can’t find one that notes issues about DrawCautionIcon, Graphics.DrawXXXXX etc

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [June 19, 2016, 5:12am UTC](https://forum.xojo.com/t/problem-with-drawcautionicon/32033/6 "2016-06-19T05:12:12Z")

</div>

Here’s the case I filed. \<[https://xojo.com/issue/43395](https://xojo.com/issue/43395)\> Sorry it’s titled “43395 - g.drawStopIcon no longer works” but it covers the caution triangle and the note icon.

---

<div class="post-metadata">

**Author:** ![Carlo\_Rubini](https://forum.xojo.com/letter_avatar_proxy/v4/letter/c/94ad74/32.png) [@Carlo\_Rubini](https://forum.xojo.com/u/Carlo_Rubini)\
**Post date:** [June 19, 2016, 9:15am UTC](https://forum.xojo.com/t/problem-with-drawcautionicon/32033/7 "2016-06-19T09:15:29Z")

</div>

Sorry Sam, I did not see your first post.  
Meanwhile I worked around the problem by using SystemIcon.Caution (macosLib).

---

<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, 6:21pm UTC](https://forum.xojo.com/t/problem-with-drawcautionicon/32033/8 "2020-10-29T18:21:52Z")

</div>


