procedure TForm1.OpenPictureDialog1TypeChange(Sender: TObject); begin if OpenPictureDialog1.FilterIndex=1 then //*.bmp //[MutilSelect := true] else //其它的 //[MutilSelect := False] end;
procedure TForm1.OpenPictureDialog1TypeChange(Sender: TObject); begin if OpenPictureDialog1.FilterIndex=1 then self.OpenPictureDialog1.Options:=[ofAllowMultiSelect]//[ofAllowMultiSelect,...]添加你的选项 else self.OpenPictureDialog1.Options:=[]; //[...]添加你的选项 end;
to Iamfish(呆鱼): 谢谢~ 你的方法只有下次OpenPictureDialog.Execute时才生效, 我想实现的是实时改变Options的值 .
begin
if OpenPictureDialog1.FilterIndex=1 then //*.bmp
//[MutilSelect := true]
else //其它的
//[MutilSelect := False]
end;
procedure TForm1.OpenPictureDialog1TypeChange(Sender: TObject);
begin
if OpenPictureDialog1.FilterIndex=1 then
self.OpenPictureDialog1.Options:=[ofAllowMultiSelect]//[ofAllowMultiSelect,...]添加你的选项
else
self.OpenPictureDialog1.Options:=[]; //[...]添加你的选项
end;
谢谢~
你的方法只有下次OpenPictureDialog.Execute时才生效, 我想实现的是实时改变Options的值 .