Scroll horizontally to item

General TRichView support forum. Please post your questions here
Post Reply
jgkoehn
Posts: 288
Joined: Thu Feb 20, 2020 9:32 pm

Scroll horizontally to item

Post by jgkoehn »

I have a RichViewEdit that only has horizontal scroll.
Ideas on how best to scroll an item into view on the horizontal scroll.
Something like
ScrollHorizontalTo(ItemNo)
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Scroll horizontally to item

Post by Sergey Tkachenko »

Code: Select all

var
  R: TRect;

  RichViewEdit1.GetItemCoordsEx(RichViewEdit1.RVData, ItemNo, 0, True, R);
  RichViewEdit1.HScrollPos := R.Left;
(For FMX, TRectF instead of TRect.
Post Reply