2021-06-28 04:31 PM - last edited on 2021-09-14 09:31 AM by Noemi Balogh
Solved! Go to Solution.
2021-06-30 07:55 AM
Viktor wrote:I did observe this behaviour, I thought that this kind of approach is wrong(I have some JavaScript webgl background where the context is a variable accessible by any function). Thank you again!
It's a general rule for all applications that they should draw only when the operating system requests them to do so. In your case it means that you can draw only in the UserItemUpdate function, so the context can't be reused. Fortunately, you can request the operating system to redraw. Call the userItem.Redraw (true, true) function which will force the call of UserItemUpdate.