trichview.com

trichview.support




Re: Why there is only RVF Format in DBRichViewEdit?


Return to index


Author

Message

Mamouri

Posted: 04/24/2003 14:45:09


Pleaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaas Help.....

I thought over anothor approach.

At first I load RVF From database to stream and then I load this stream into

RichView. after that I edit documents and then insert RVF to stream and post

it to table. but my problem dosent solve.

here is my code:

var

   IsEmpty: boolean;

   Stream: TMemoryStream;

begin

     with RVStyle.TextStyles do

     begin

          Add;

          Items[Count].Jump := True;

          Items[Count].FontName := 'Badr';

          Items[Count].Size := 14;

          Items[Count].Color := clBlue;

          Items[Count].HoverColor := clRed;

          Items[Count].BackColor := clNone;

     end;


     Stream := TMemoryStream.Create;


     DM.Matn.First;

     while not DM.Matn.Eof do

     begin

          Stream.Clear;

          DM.MatnMatn.SaveToStream(Stream);

          Stream.Position := 0;

          RVE.LoadRVFFromStream(Stream);

          RVE.Format;


          if DM.Matn.RecNo > 10 then exit;

          IsEmpty:= (rve.ItemCount=0) or ((rve.ItemCount=1) and (rve.GetItemStyle(0)>=0)

and (rve.GetItemText(0)=''));

          if IsEmpty then begin DM.Matn.Next; continue; end;





          DM.tblEstelah.First;

          while not DM.tblEstelah.Eof do

          begin

               RVE.SetSelectionBounds(0, 0, 0, 0);

               while RVE.SearchText(Trim(DM.tblEstelah.FieldByName('Estelah').Text),

[rvseoDown, rvseoWholeWord]) do

                     RVE.ApplyTextStyle(RVStyle.TextStyles.Count);


               DM.tblEstelah.Next;

          end;

          Label1.Caption:=IntToStr(DM.Matn.RecNo);

          Label1.Update;


          Stream.Clear;

          RVE.SaveRVFToStream(Stream, False);

          Stream.Position := 0;

         

          DM.Matn.Edit;

          DM.MatnMatn.LoadFromStream(Stream);

          DM.Matn.Post;

          DM.Matn.Next;


          Stream.Clear;

     end;

     ShowMessage('Complete');


Does anybody can help?

andy idea? andy solution?


Thanx from your attention

Regards


"Mamouri" <mamouri@ganjafzar.com> wrote:

>

>Sorry...

>Problem is not from TRichView. DBISAM cause this problem.

>I write a little project with BDE and Paradox and it work fine! But when

>I use DBISAM, all things go wrong.

>

>I dont know why? My field type in DBISAM is BLOB. I tested TypedBinary too

>but I still had problem!

>

>Does anybody know why DBISAM have this probelm?

>and is there a way to correct it?

>Perhaps DBISAM is not compatible with TRichView or perhaps TRichView uses

>of functions and method that DBISAM dont support them.

>

>BTW I remeber that 1 or 2 month ago somebody else asked a question like

my

>question, here. But I could not find it!

>

>Sorry for my poor english

>Regards

>

>"Mamouri" <Mamouri@ganjafzar.com> wrote:

>>

>>Hi!

>>I dont know if this is a bug or I forget a thing.

>>When I try to edit and post records with DBRichViewEdit all thing go correct

>>but next time I run my program I see just RVF Format inside DBRichViewEdit

>>not formatted document.

>>I hope you understand me!

>>In fact I see some codes and number that usually I see in *.rvf files inside

>>DBRichViewEdit.

>>

>>What I must do? Is it an error? Or Perhaps I forgot a thing.

>>

>>Regards

>





Powered by ABC Amber Outlook Express Converter