Improvement

General TRichView support forum. Please post your questions here
Post Reply
salexn
Posts: 5
Joined: Sun Dec 28, 2008 10:13 pm

Improvement

Post by salexn »

Hi Sergey!
I want to propose small improvement to method SetSmartPopupCoords in RVRVData module.

I have modified following code:

Code: Select all

  with RVData.DrawItems[DItemNo] do
      R := Bounds(Left, Top, Width, Height);
to

Code: Select all

  if RVData.SelectionExists(False, False) then
    R := GetClientSelectionRect
  else
    with RVData.DrawItems[DItemNo] do
      R := Bounds(Left, Top, Width, Height);
In this case the smartpopup icon popups in correct place.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Currently, smartpopopup button is positioned relatively the current item.
I agree, positioning it at the selection may be useful, but only as an option specified explicitly by the programmer.

Unfortunately, calculation of the button position for selection is more complicated than calling GetClientSelectionRect.
I added in TO-DO list.
Post Reply