什么是DelphiVCL.PaintBox,它是如何工作的?

241 阅读1分钟

DelphiVCL.PaintBoxTPaintBox提供了一个画布,当你开发Windows软件时,应用程序可以用它来渲染图像。

我们可以使用TPaintBox将自定义图像添加到表单中。与TImage不同,TImage显示存储在位图、图标或元文件中的图像,TPaintBox需要应用程序直接在画布上绘制图像。使用OnPaint事件处理程序在画框的Canvas上绘图,即画框的绘图表面。

让我们用dir()命令浏览DelphiVCL.PaintBox的所有属性和方法。

import DelphiVCL

dir(DelphiVCL.PaintBox)

请看我们的Windows命令提示符中的反应。

What Is A DelphiVCL.PaintBox And How Does It Work? Properties listed.

你也可以使用print()命令阅读关于DelphiVCL.PaintBox 的简短信息。

print(DelphiVCL.PaintBox)
print(DelphiVCL.PaintBox.__doc__)

请看我们的Windows命令提示符中的响应。

What Is A DelphiVCL.PaintBox And How Does It Work? A command prompt showing the TPaintbox methods.

查看DelphiVCL,它可以轻松地让你使用Python为Windows建立GUI。

The postWhat Is A DelphiVCL.PaintBox and How Does It Work?首先出现在Python GUI上。