trichview.support
Re: Deleting all bitmaps in a document (TDBRichViewEdit) |
Author |
Message |
Tavo |
Posted: 10/31/2002 18:16:27 Hello Sergey Tkachenko wrote: >>procedure DeleteBMPS(RVData: TCustomRVData); >>var i: Integer; >>begin >> i := 0 ; >> while i < RVData.Items.Count do begin >> if RVData.GetItemStyle(i)=rvsPicture then >> RVData.DeleteItems(i,1) >> else Inc(i) ; >> end ; >>end; > > This method should work. But do not forget to call Format after it. Really, Only I needed that call :-) > procedure DeleteBMPS(RVData: TCustomRVData); > var i: Integer; > ps: Boolean; > begin > for i := RVData.Items.Count-1 downto 0 do begin > ps := RVData.IsParaStart(i); > RVData.DeleteItems(i,1); > if ps and > (i<RVData.Items.Count) and > not RVData.IsParaStart(i) then > RVData.GetItem(i).SameAsPrev := False; > end; > end; I've tried this code but it delete all in the document. It has worked like clear method. Perhaps lack to verify if the item is bitmap (or something like this) but I do not know how. > Besides, you can consider storing pictures outside documents (in > files or in a database). Thanks for the answer and the advice, Sergey. Tavo. |
Powered by ABC Amber Outlook Express Converter