在设计期时,单击TImage的Picture属性,会弹出一个装载图象的属性编辑对话框,
双击TImageList时也会出现另外一个装载图象的属性编辑对话框。现在,我要它们在运行期出现,如何做到呀!

解决方案 »

  1.   

    哈哈、很难、如果可以直接用就好玩了:P我以前都是用间接的方法、就是把
    $Delphi\Source\Property Editors中定义的东西直接拿来使用、具体如下:
    打开菜单栏Component->Install packages,在Runtime packages一栏中选上‘Build with runtime packages’复选框、清空后再加入DesignIDE
    uses PicEdit;var
      APictureEditor: TPictureEditor;
    begin
      APictureEditor := TPictureEditor.Create(nil);
      try
        APictureEditor.Picture.Assign(Image1.Picture);
        if APictureEditor.Execute then Image1.Picture.Assign(APictureEditor.Picture);
      finally
        APictureEditor.Free;
      end;
    end;
      

  2.   

    谢谢,跟我当初的想法一样,不过我就找不出单元放在哪,IDE上该如何设置;请顺便告诉我TImageList的单元,设置与用法。
      

  3.   

    那个单元文件我看到过,我曾经也打开过那人编辑器在DELPHI中的窗体文件,你试着找一找,一定有的。
      

  4.   

    位置上面不是说了吗、单元都在Delphi的安装路径$Delphi\Source\Property Editors文件夹下、IDE设置上面不是也说了吗、TImageList的单元没找着、只有用于CLX程序的ClxItemEdit.pas、TClxImageListEditor、翻了一下ImgList单元、都是调用API函数、这个不清楚要怎么弄:(
      

  5.   

    我找到了,可那个窗体是clx格式的,我不会用!
    procedure TfrmConfig.ToolButton6Click(Sender: TObject);
    var
      clxImgDlg: TClxImageListEditor;
    begin
      clxImgDlg:=TClxImageListEditor.CreateImgListEditor(Self,ImageList1);// 这里编译出错,说:Incompatible types:'QImgList.TImageList' and 'Controls.TImageList'
      clxImgDlg.ImageList.Assign(ImageList1);
      if clxImgDlg.ShowModal=mrOk then
        ImageList1.Assign(clxImgDlg.ImageList);
      clxImgDlg.Free;
    end;
    谁帮我改改呀!