cxImage控件使用

属性:

  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;

 

posted @ 2016-03-11 20:59  liessay  阅读(628)  评论(0编辑  收藏  举报