How to check if RVE contain picture?
Posted: Thu Sep 15, 2005 7:44 am
How can I check when an RVE content has picture in it?
Support forums for TRichView, ScaleRichView, Report Workshop and RVMedia components
https://richedit.com/forums/
Code: Select all
// This procedure will be called for each RichView item
procedure TForm3.EnumItemsProc(RVData: TCustomRVData; ItemNo: Integer;
var UserData1: Integer; const UserData2: String;
var ContinueEnum: Boolean);
begin
if (RVData.GetItemStyle(ItemNo)=rvsPicture) or
(RVData.GetItemStyle(ItemNo)=rvsHotPicture) then begin
UserData1 := 1;
ContinueEnum := False;
end
else
ContinueEnum := True;
end;
procedure TForm3.Button1Click(Sender: TObject);
var HasPictures: Integer;
begin
HasPictures := 0;
RichViewEdit1.RVData.EnumItems(EnumItemsProc, HasPictures, '');
if HasPictures<>0 then
Caption := 'YES'
else
Caption := 'NO';
end;