PChar-Tags within tables

General TRichView support forum. Please post your questions here
Post Reply
thomasvonkapellen
Posts: 6
Joined: Wed Oct 08, 2008 8:30 am

PChar-Tags within tables

Post by thomasvonkapellen »

Hi,

I inserted an PChar-Tag into a table with table.Cells[RowCount-1,1].AddNLTag.

Now I try to get this Tag via TRichView.OnJump.

Code: Select all

procedure TfrmMain.rvwBenutzerJump(Sender: TObject; id: Integer);
var
 iItemNo    : integer;
 pItemTag   : PChar;
 sItemTag   : string;
 sItemText  : string;
 sDateiname : string;
 rvd        : TCustomRVFormattedData;
begin
 with rvw do begin
   // tag werte auslesen aus jump point
   GetJumpPointLocation(id, rvd, iItemNo);
   pItemTag  := PChar(GetItemTag(iItemNo));
   sItemTag  := pItemTag;
   sItemText := GetItemText(iItemNo);
end;
ShowMessage(sItemTag);

end; { procedure }
sItemTag is always empty, id is 0 and iItemNo also. So how can I get the Tag from that cell? If I add the outside the table, everything works fine and I don't know what I'm doing wrong?

Thanks
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Code: Select all

procedure TfrmMain.rvwBenutzerJump(Sender: TObject; id: Integer); 
var 
 iItemNo    : integer; 
 pItemTag   : PChar; 
 sItemTag   : string; 
 sItemText  : string; 
 sDateiname : string; 
 rvd        : TCustomRVFormattedData; 
begin 
   rvw.GetJumpPointLocation(id, rvd, iItemNo); 
   pItemTag  := PChar([color=red]rvd.[/color]GetItemTag(iItemNo)); 
   sItemTag  := pItemTag; 
   sItemText := [color=red]rvd.[/color]GetItemText(iItemNo); 
end; 
ShowMessage(sItemTag); 

end; { procedure }
thomasvonkapellen
Posts: 6
Joined: Wed Oct 08, 2008 8:30 am

Post by thomasvonkapellen »

Thank a lot. On this way, I have to compliment you on doing a great job. TRichView is an excellent package and support is exemplary!
Post Reply