trichview.com

trichview.support




Re: Finding a Table


Return to index


Author

Message

Sergey Tkachenko

Posted: 10/25/2003 11:59:43


function FindTable(rv: TCustomRichView; TableNo: Integer): TRVTableItemInfo;

var i: Integer;

begin

  for i := 0 to rv.ItemCount-1 do

    if rv.GetItemStyle(i)=rvsTable then begin

      if TableNo=0 then begin

        Result := TRVTableItemInfo(rv.GetItem(i));

        exit;

      end;

      dec(TableNo);

    end;

  Result := nil;

end;


This functions searches the TableNo-th table in rv (table numbering starts

from 0)


If you have questions on #2 and #3, feel free to ask.



>

> After loading a RVF from a DB I need to...

> 1. locate a specific table in the document (i.e. the fifth table)  a table

> "identifier" could be saved in my db if that makes this easier.

> 2. Determining it's column headings & left row names

> 3. Populate the table based on db data

>

> Any help would be appreciated, mainly with #1. I think i can find the

other

> answers in this news group

>

> Thanks





Powered by ABC Amber Outlook Express Converter