# Web Canvas Question

**URL:** <https://forum.xojo.com/t/web-canvas-question/32660>\
**Category:** Web\
**Created:** [July 26, 2016, 3:15pm UTC](https://forum.xojo.com/t/web-canvas-question/32660 "2016-07-26T15:15:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Stallo](https://forum.xojo.com/user_avatar/forum.xojo.com/peter_stallo/32/1551_2.png) [@Peter\_Stallo](https://forum.xojo.com/u/Peter_Stallo)\
**Post date:** [July 26, 2016, 3:15pm UTC](https://forum.xojo.com/t/web-canvas-question/32660/1 "2016-07-26T15:15:59Z")

</div>

Anybody know the trick to make a web canvas visible and display it’s paint events?

I have a web canvas in a container control that displays an image on the paint event. If the default ContainerControl1.Visible property is True, everything works fine.

If I set the default ContainerControl.Visible property to False on startup and use a button to set ContainerControl1.visible = true, it refuses to display the image.

The code of the canvas Paint event is:

```auto
g.DrawPicture(MyPicture, 0, 0)
```

I have tried every permutation of the following lines of code and it still won’t display (I’m using Xojo 2016 R2). If I check the visible property of the canvas, it indicates that it is visible, but it’s like the Paint event isn’t occurring or something.

` ContainerControl1.visible = true
    ContainerControl1.Canvas1.invalidate(false)
    ContainerControl1Canvas1.Refresh`

---

<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:24pm UTC](https://forum.xojo.com/t/web-canvas-question/32660/2 "2020-10-29T18:24:31Z")

</div>


