FireMonkey 控件是否具有与 VCL Invalidate() 等效的方法?
我正在创建一些自定义 FireMonkey GUI 控件。组件需要更新以响应用户交互。 VCL 控件可以调用 Invalidate() 将其放入队列中进行重绘。 FireMonkey 有等效的方法吗?
FireMonkey 控件有一个 Repaint() 方法,但 AFAICT 会强制立即重新绘制控件。在某些情况下,队列类型系统会更合适。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
FireMonkey 的 TControl.Repaint 最终调用 TPlatformWin.ReleaseWindow。如果 Form.Transparency 为 false,则此方法将调用 Windows InvalidateRect 函数,就像 VCL 的 TControl.Invalidate 一样。
所以Repaint实际上做了与VCL的Invalidate相同的事情,除非Form.Transparency=true。
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.