trichview.com

trichview.support




trying to copy


Return to index


Author

Message

JMarcos Rueda

Posted: 01/09/2004 15:48:25


first very obliged for helping me before with the hand...


it would like that it helped me to copy the values of a TRichView for

another one and later vice it turns follows the routine that I am trying to

mount:


procedure Tfrm_mesclagem.btnMesclarClick(Sender: TObject);

var

     i:word;

     Stream: TMemoryStream;

begin

        if x = 0 then  //first click

        begin

            x:=2;

            if listcamp.Count > 0 then

            begin

                    Stream := TMemoryStream.Create;

                    frm_principal.rve.SaveRVFToStream(Stream, False);

                    Stream.Position := 0;

                    frm_principal.rve2.LoadRVFFromStream(Stream);

                    Stream.Free;

                    frm_principal.rve2.FormatTail;


                    for i:=0 to listcamp.count -1 do

                    begin

                    frm_principal.rve.SetSelectionBounds(0,

frm_principal.rve.GetOffsBeforeItem(0),  0,

frm_principal.rve.GetOffsBeforeItem(0));

                        while

frm_principal.rve.SearchText('<<'+listcamp.Strings[i]+'>>',[rvseoDown]) do

                        begin


frm_principal.rve.InsertText(procampo(listcamp.strings[i]));

                        end;

                    end;

            end;

        end

        else // second click

        begin


            {the values before the alteration comes back.}

            x:=0;

            Stream := TMemoryStream.Create;

            frm_principal.rve2.SaveRVFToStream(Stream, False);

            Stream.Position := 0;

            frm_principal.rve.LoadRVFFromStream(Stream);

            Stream.Free;

            frm_principal.rve.FormatTail;

        end;

end;


when returning the value is blank....



thank you

JMarcos Rueda - Brazil






Powered by ABC Amber Outlook Express Converter