OnRVMouseDown and get ItemNo
Posted: Wed Mar 29, 2006 9:40 am
Hello!
Please help me.
I want to get Tag number in OnRVMouseDown event and I can not....
OnRVMouseDown returns ItemNo, but my ItemTag are in the table.... and I receive ItemNo table (not my ItemTag) please see example:
1. Create table and insert ItemTag in table:
2. OnRVMouseDown.....
--
How i can get ItemNo of Item Tag 1 or 2 (its in table) and how i can get tag number of this item
Thanks!
Please help me.
I want to get Tag number in OnRVMouseDown event and I can not....
OnRVMouseDown returns ItemNo, but my ItemTag are in the table.... and I receive ItemNo table (not my ItemTag) please see example:
1. Create table and insert ItemTag in table:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
table : TRVTableItemInfo;
begin
RichView1.Clear;
table := TRVTableItemInfo.CreateEx(1{Rows}, 2{Cols}, RichView1.RVData);
table.Cells[0,0].Clear;
table.Cells[0,0].AddNLTag('Item Tag ¹1', 1, 0, integer(StrNew('123')));
table.Cells[0,1].Clear;
table.Cells[0,1].AddNLTag('Item Tag ¹2', 1, 0, integer(StrNew('456')));
RichView1.AddItem('', table);
RichView1.Format;
end;
Code: Select all
procedure TForm1.RichView1RVMouseDown(Sender: TCustomRichView;
Button: TMouseButton; Shift: TShiftState; ItemNo, X, Y: Integer);
begin
//I mouse down on my ItemTag "'Item Tag 2" but ItemNo is TABLE No........
Panel1.Caption := IntToStr(ItemNo);
end;
How i can get ItemNo of Item Tag 1 or 2 (its in table) and how i can get tag number of this item
Thanks!