I had some troubles with dual-monitor usage of TIntlDatePicker. The Popup always opened on the border of my first screen.
This happens because:
- Code: Select all
procedure TCustomIntlDatePicker.PopupDropDown;
var
TopLeft: TPoint;
X, Y, W, H: Integer;
begin
if Enabled and CanModify and not CalendarPopup.Visible then
begin
CalendarPopup.HandleNeeded;
TopLeft := Parent.ClientToScreen(Point(Left, Top));
CalendarPopup.GetPreferredControlSize(W, H);
if W < Width then
W := Width;
if UseRightToLeftAlignment then
X := TopLeft.X + Width - W
else
X := TopLeft.X;
if X < 0 then
X := 0
else if X + W > Screen.Width then
X := Screen.Width - W;
Y := TopLeft.Y + Height;
if Y + H > Screen.Height then
Y := TopLeft.Y - H;
CalendarPopup.Date := Date;
Checked := True;
CalendarPopup.SetBounds(X, Y, W, H);
CalendarPopup.Show(X, Y);
InvalidateDropDown;
InvalidateDate;
end;
end;
... now I changed Screen.Width / Height to DesktopWidth/DektopHeight and it worked!
I hope this helps other users too... (will this be in the next update?)
greets
Daniel