Difference between revisions of "Calendar"

From Team Developer SqlWindows Wiki
Jump to: navigation, search
(Added tip on fixing cCalendarDropDown multi-monitor issue)
Line 5: Line 5:
  
 
<!------------------------------------------------------------------------------------------------------------------------------>
 
<!------------------------------------------------------------------------------------------------------------------------------>
{{TipHeader|Enter new tip title here}}
+
{{TipHeader|cCalendarDropDown multi-monitor fix}}
Enter new tip description here
+
The calendar popup window is normally presented below the corresponding date-field when clicking on the dropdown button.<br>
 +
But when using a multi-monitor setup and the parent window is on another monitor than the main one, the popup calendar is<br>
 +
not displayed below the datefield but on the main monitor.<br>
 +
This issue occurs on all TD versions (up to TD6.0) !<br>
 +
<br>
 +
[[Image:CCalendarDropDownFix.png‎]]
 +
<br>
 +
The workaround is to reposition the calendar popup window to the correct location on screen at the time it is displayed.<br>
 +
Look at the sample and locate the messages section of the custom control class. There the window handle of the popup window<br>
 +
is retrieved and used to reposition it to the parent date-field.<br>
 +
<br>
 +
 
 +
Here you can download the sample:
 +
*[http://samples.tdcommunity.net/index.php?dir=&file=cCalendarDropDown_multimonitor_fix.zip cCalendarDropDown_multimonitor_fix.zip]<br>
 +
<br>
 +
<br>

Revision as of 14:32, 7 October 2011

This page covers VT Calendar tips & tricks.

Contents


Pointer2.png cCalendarDropDown multi-monitor fix Pointer.png

The calendar popup window is normally presented below the corresponding date-field when clicking on the dropdown button.
But when using a multi-monitor setup and the parent window is on another monitor than the main one, the popup calendar is
not displayed below the datefield but on the main monitor.
This issue occurs on all TD versions (up to TD6.0) !

CCalendarDropDownFix.png
The workaround is to reposition the calendar popup window to the correct location on screen at the time it is displayed.
Look at the sample and locate the messages section of the custom control class. There the window handle of the popup window
is retrieved and used to reposition it to the parent date-field.

Here you can download the sample: