Question

I'm creating some custom FireMonkey GUI controls. The components need to update in response to user interactions. VCL controls can call Invalidate() to be placed into a queue for repainting. Does FireMonkey have an equivalent method?

FireMonkey controls have a Repaint() method, but AFAICT that forces the control to be repainted immediately. A queue type system would be more appropriate in some circumstances.

Was it helpful?

Solution

Control.InvalidateRect(RectF(0,0,width,height));

OTHER TIPS

FireMonkey's TControl.Repaint ends up calling TPlatformWin.ReleaseWindow. If Form.Transparency is false then this method calls the Windows InvalidateRect function, just like VCL's TControl.Invalidate does.

So Repaint actually does the same thing VCL's Invalidate does, unless Form.Transparency=true.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top