TAdvSmoothDropDown with multi-screen environment

Windows 7 SP1 x64
RAD Studio 10.1 Berlin Update 2
TMS VCL UI Pack v10.1.7.0

Hi,

I've found an undesired behaviour with the AdvSmoothComboBox in a multi-screen environnement. The dropdown seems to think that the Windows Taskbar is visible on all the screens, even if it is present only on the primary.

So, if we set the dropdown height to use all the available space underneath the component, the dropdown will drop "up", thinking it has not sufficient space.

This behaviour can also be replicated if the screens do not have the same resolution or height position.

▀▀▀▀▀▀ = TaskBar
Ex 1:

┌──────┐┌──────┐
│      ││      │
└──────┘└▀▀▀▀▀▀┘


Ex 2:
        ┌──────┐
┌──────┐│      │
│      │└▀▀▀▀▀▀┘
└──────┘



To test this behaviour, create a new projet with an AdvSmoothComboBox and the the following OnClick:

procedure TForm1.AdvSmoothComboBox1Click(Sender: TObject);
var
  currentMonitor: TMonitor;
  rectWorkArea: TRect;
  bottomRight: TPoint;
begin
  currentMonitor := Screen.MonitorFromWindow(AdvSmoothComboBox1.Handle);
  rectWorkArea := currentMonitor.WorkareaRect;
  bottomRight := AdvSmoothComboBox1.ClientToScreen(Point(AdvSmoothComboBox1.Width, AdvSmoothComboBox1.Height));

  AdvSmoothComboBox1.DropDownHeight := rectWorkArea.Bottom - bottomRight.Y;
end;

The second exemple can be isolated by fixing the size of the dropdown to a certain value. Once the dropdown is at a position in-line with the taskbar of the primary monitor (the middle, in my exemple), it will drop "up".

Thanks.

Thank you for the clear explanation.

We were able to reproduce your problem and this should be improved in the following update.