Do FireMonkey controls have an equivalent to the VCL Invalidate() method?

♀尐吖头ヾ 提交于 2019-12-06 01:54:29

问题


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.


回答1:


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



回答2:


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.



来源:https://stackoverflow.com/questions/8409995/do-firemonkey-controls-have-an-equivalent-to-the-vcl-invalidate-method

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!