Page 1 of 1

Improvement

Posted: Tue Jan 14, 2014 8:08 am
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.

Posted: Fri Jan 24, 2014 1:05 pm
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.