属性:
Picture:载入要显示的图片
Properties->Caption在没有内容的时候显示在图片框中间的文字
Properties->PopupMenuLayout->MenuItems可选择需要显示在图片上的右键菜单命令
//载入图片procedure TForm1.Button2Click(Sender: TObject); begin if OpenDialog1.Execute then begin cxImage1.Picture.LoadFromFile(OpenDialog1.FileName); end; end; //保存图片 procedure TForm1.Button3Click(Sender: TObject); begin if SavePictureDialog1.Execute then begin cxImage1.Picture.SaveToFile(SavePictureDialog1.FileName); end; end;
时间: 2024-11-03 03:43:14