Canvas: how to set to visible and draw on first click?

Hi -

There may be an obvious solution, but I wasn’t able to find an answer to this elsewhere.

I just can’t figure out how to set a canvas to visible and show the drawing on it both on the first click of a button. In my below hide/show example it requires a second click on the “show canvas” button to display the drawing. The drawing then stays visible for subsequent clicks. Just not on the first click…

Any help would be much appreciated.

blocks (1)

blocks

Try switching block order order

It might work. Does it?

The canvas will need to be visible first before you can draw on it, I believe…

It could be that the canvas is still trying to set itself up and isn’t ready to receive the drawing request. in this case, introduce a timer.

Brilliant. A delay timer did the trick. In the Designer I unchecked “TimerEnabled” and set TimerInterval to just 1 millisecond which is enough.

blocks (2)

blocks (3)

Appreciate the reply SteveJG. I did try this without success unfortunately.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.