View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004463 | JEDI VCL | 00 JVCL Components | public | 2008-09-17 09:17 | 2008-10-26 06:15 |
Reporter | asertac | Assigned To | AHUser | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.35 | ||||
Target Version | Fixed in Version | 3.36 | |||
Summary | 0004463: JvDateEdit's calendar dialog pops in weird places with a form not on the primary monitor. | ||||
Description | The function "SelectDate" in "JvPickDate.pas" does not have code to handle multi monitor setups. This causes the JvSelectDateDlg to pop in weird places instead of around JvDateEdit control, if the form containing the control is not on the primary monitor. | ||||
Additional Information | Here is a suggested fix; function SelectDate(Sender: TWinControl; var Date: TDateTime; const DlgCaption: TCaption; AStartOfWeek: TDayOfWeekName; AWeekends: TDaysOfWeek; AWeekendColor: TColor; BtnHints: TStrings; MinDate: TDateTime; MaxDate: TDateTime): Boolean; var D: TJvSelectDateDlg; I: Integer; P: TPoint; // Polaris //--> new variables MonHandle: HMonitor; MonInfo: TMonitorInfo; ScrLeft, ScrRight, ScrBottom: Integer; //-- begin Result := False; D := CreateDateDialog(DlgCaption, MinDate, MaxDate); try // Polaris for Popup position if Assigned(Sender) then with D do begin Position := poDesigned; P := (Sender.ClientOrigin); //--> new code DefaultMonitor := dmDesktop; ScrLeft := 0; ScrRight := Screen.Width; ScrBottom := Screen.Height; MonHandle := MonitorFromPoint(P, MONITOR_DEFAULTTONEAREST); MonInfo.cbSize := SizeOf(TMonitorInfo); if GetMonitorInfo(MonHandle, @MonInfo) then begin ScrLeft := MonInfo.rcWork.Left; ScrRight := MonInfo.rcWork.Right; ScrBottom := MonInfo.rcWork.Bottom; end; //-- Top := P.Y + Sender.Height - 1; //--> modified code // if (Top + Height) > Screen.Height then // Top := P.Y - Height + 1; // if Top < 0 then // Top := P.Y + Sender.Height - 1; if (Top + Height) > ScrBottom then Top := P.Y - Height + 1; //-- Left := (P.X + Sender.Width) - Width; //--> modified code // if (Left + Width) > Screen.Width then // Left := Screen.Width - Width; // if Left < 0 then // Left := Max(P.X, 0); if (Left + Width) > ScrRight then Left := ScrRight - Width; if Left < ScrLeft then Left := Max(P.X, ScrLeft); //-- end; . . . | ||||
Tags | No tags attached. | ||||
|
forgot to add, uses .., multimon; |
|
Please post the zipped sources of a sample application showing this. |
2008-10-05 06:25
|
4462-3.zip (43,195 bytes) |
|
Done. |
|
Fixed in SVN. |
Date Modified | Username | Field | Change |
---|---|---|---|
2008-09-17 09:17 | asertac | New Issue | |
2008-09-17 09:28 | asertac | Note Added: 0014609 | |
2008-09-29 06:45 | obones | Note Added: 0014724 | |
2008-09-29 06:45 | obones | Status | new => feedback |
2008-10-05 06:25 | asertac | File Added: 4462-3.zip | |
2008-10-05 06:25 | asertac | Note Added: 0014746 | |
2008-10-26 06:14 | AHUser | Status | feedback => resolved |
2008-10-26 06:14 | AHUser | Fixed in Version | => Daily / SVN |
2008-10-26 06:14 | AHUser | Resolution | open => fixed |
2008-10-26 06:14 | AHUser | Assigned To | => AHUser |
2008-10-26 06:14 | AHUser | Note Added: 0014914 |