trichview.com

trichview.support




Re: a small problem


Return to index


Author

Message

Sergey Tkachenko

Posted: 01/10/2003 15:45:31


> Hi All.

>

> I am playing with using the Richview to create a user made display of

data.

> What I mean is my application retrieves data from various sources and sets

> variables. Every 5 seconds I use a system like in the Mail Merge Demo to

> FIND and FILL the tags. The user can create a display by using an editor

and

> make the data as big or small as he wants. Change colours and everything.

>

>

> However I have also in my rvf file included a HYPERlINk and the above

method

> finds this and tries to alter it. I need to leave these type of fields

> alone. Is there a way Or do I add some smart coding to get around this?


Here is a modified procedure for assigning field values (original is in

mailmerge demo).

It ignores hypertext links (see line marked with ***):


procedure TForm1.FillFields(RVData: TCustomRVData);

var i,r,c: Integer;

    table: TRVTableItemInfo;

    FieldName: String;

begin

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

    if RVData.GetItemStyle(i)=rvsTable then

    begin

      table := TRVTableItemInfo(RVData.GetItem(i));

      for r := 0 to table.Rows.Count-1 do

        for c := 0 to table.Rows[r].Count-1 do

          if table.Cells[r,c]<>nil then

            FillFields(table.Cells[r,c].GetRVData);

      table.Changed;

    end

    else if (RVData.GetItemStyle(i)>=0)  and

//***

      not RVData.GetRVStyle.TextStyles[RVData.GetItemStyle(i)].Jump  then

//***

    begin

      FieldName := PChar(RVData.GetItemTag(i));

      if FieldName<>'' then

        RVData.SetItemText(i, GetFieldValueFromDatabase(FieldName));

    end;

end;



> Also is there a way of having say the bottom half of the page scrolling

and

> the top half display normally? I want to display local data in the top

ha;f

> and remote data in a smaller window in the bottom half of the page. The

> remote data is quite extensive so it needs to scroll up a bit, display a

bit

> more, scroll again, stop, scroll etc...


So do you want to have two richviews, one of them is scrolled to the

specified place in the document?

It's possible, for example you can use ScrollTo and GetItemCoords.







Powered by ABC Amber Outlook Express Converter