trichview.com

trichview.support




Re: Hiding tables


Return to index


Author

Message

Jim Hawkins

Posted: 08/02/2004 11:14:53


Thanks, Sergey


Is there any way of saving table names in RTF? The tables are saved but the

ItemText is empty.


jim



"Sergey Tkachenko" <svt@trichview.com> wrote:

>This procedure moves all tables having name 'config' from source to dest.

>It may be called after loading the document on source (before calling

>source.Format - it calls it itself)

>

>procedure MoveTables(source, dest: TCustomRichView);

>var i: Integer;

>    Stream: TMemoryStream;

>    table: TRVTableItemInfo;

>begin

>  dest.Clear;

>  for i := source.ItemCount-1 downto 0 do

>    if (source.GetItemStyle(i)=rvsTable) and

>       (source.GetItemText(i)='config') then begin

>      Stream := TMemoryStream.Create;

>      TRVTableItemInfo(source.GetItem(i)).SaveToStream(Stream);

>      table := TRVTableItemInfo.CreateEx(1,1,dest.RVData);

>      Stream.Position := 0;

>      table.LoadFromStream(Stream);

>      Stream.Free;

>      dest.AddItem(source.GetItemText(i), table);

>      source.DeleteItems(i,1);

>    end;

>  source.Format;

>  dest.Format;

>end;

>

>

>>

>> There could be several of these - but they are all created by the program,

>> so they can have names for identification.

>>

>> TIA

>>

>> Jim

>>

>> "Sergey Tkachenko" <svt@trichview.com> wrote:

>> >I can write a code for removing table to another RichView.

>> >But how to find this table?

>> >If this is a first item in the document, or it's a first table in the

>> >document, or it has a special itemname?

>> >

>> >

>> >>

>> >> Is it possible to hide and entire table? I want to store some complex

>> >annotations

>> >> with my main editor, buit when loading the RVF file into a separate

>viewer

>> >> have this table hidden, so that I can process the note links

>dynamically.

>> >>

>> >> Alternatively, can I, at load time, assign the table to another

>richview

>> >> and delete it from the viewer? It's not clear how to delete a table

>> >programatically.

>> >>

>> >> Jim

>> >

>> >

>>

>

>





Powered by ABC Amber Outlook Express Converter