rve.GetItemCoords identifies 1st line of multline Paragraph
Posted: Sat May 17, 2008 11:21 am
Hello Sergey,
recently you helped me, to jump to a y- position in the memo ("procedure TForm1.Go2memoYpos").
The procedure works correctly.
In the meanwhile, I noticed that the identification of the y-position in a memo with "rve.GetItemCoords" is not correct.
"rve.GetItemCoords" identifies always the 1st line of a multi-paragraph. But I need the correct y-Position.
"OnMouseMoveUp" also doesn't work correct for what I want. If someone needs the y-position in rve, this procedure refers always to the y-position in memo-window (as soon as I scroll, y-Pos is wrong).
Is there a counterpart to "Go2memoYpos"?
Jürgen
procedure TForm1.Go2memoYpos; //---> OK <-----
var RVData:TCustomRVFormattedData;
ItemNo, OffsetInItem: Integer;
begin
rve.GetItemAt(0, rveYpos, RVData, ItemNo, OffsetInItem, False);
RVData := TCustomRVFormattedData(RVData.Edit);
RVData.SetSelectionBounds(ItemNo, OffsetInItem, ItemNo, OffsetInItem);
end;
recently you helped me, to jump to a y- position in the memo ("procedure TForm1.Go2memoYpos").
The procedure works correctly.
In the meanwhile, I noticed that the identification of the y-position in a memo with "rve.GetItemCoords" is not correct.
"rve.GetItemCoords" identifies always the 1st line of a multi-paragraph. But I need the correct y-Position.
"OnMouseMoveUp" also doesn't work correct for what I want. If someone needs the y-position in rve, this procedure refers always to the y-position in memo-window (as soon as I scroll, y-Pos is wrong).
Is there a counterpart to "Go2memoYpos"?
Jürgen
procedure TForm1.Go2memoYpos; //---> OK <-----
var RVData:TCustomRVFormattedData;
ItemNo, OffsetInItem: Integer;
begin
rve.GetItemAt(0, rveYpos, RVData, ItemNo, OffsetInItem, False);
RVData := TCustomRVFormattedData(RVData.Edit);
RVData.SetSelectionBounds(ItemNo, OffsetInItem, ItemNo, OffsetInItem);
end;