delphi - 如何在运行时将图像分配给 TImage 控件

标签 delphi firemonkey

我在 Firemonkey 应用程序中使用 TImage。我想在运行时为其分配图像。如何做到这一点?

最佳答案

图片由 Bitmap 指定属性(property)。例如:

Image1.Bitmap.LoadFromFile(FileName);

Image1.Bitmap.LoadFromStream(Stream);

Image1.Bitmap.Assign(MyBitmap);

关于delphi - 如何在运行时将图像分配给 TImage 控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33592232/

相关文章:

delphi - 将错误的记录信息发布到表中

delphi - 如何更改 FM TSpeedButton 的颜色

delphi - TMediaPlayer 错误 - 不支持的媒体文件

android - 在 firemonkey 中播放声音

string - 在 Delphi 中查找和计算字符串中的单词?

delphi - 在 Delphi XE2 上使用运行时包进行构建

德尔福XE2 : OnHideHint event to automatically restore the previous text in the StatusBar?

sockets - 通过TClientSocket从网站加载图像

android - delphi/android如何通过地址找到涉及的代码行

json - 如何在Delphi XE3中解析JSON对象中的指定值?