Dual-Monitor Mode (i18n)

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

Dual-Monitor Mode (i18n)

Postby keeny » December 16th, 2011, 10:03 am

Hi

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
keeny
Member
Member
 
Posts: 1
Joined: December 16th, 2011, 9:30 am

Re: Dual-Monitor Mode (i18n)

Postby Kambiz » December 18th, 2011, 3:44 pm

Hi,

Thanks for the fix!
Of course, it will be in the next update.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 2 guests

cron