Difference between revisions of "Calendar"

From Team Developer SqlWindows Wiki
Jump to: navigation, search
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
'''This page covers VT Calendar tips & tricks.'''
+
{{PageHeader|VisualToolchest Calendar Control}}
 +
 
  
 
__TOC__
 
__TOC__
<br>
+
 
  
 
<!------------------------------------------------------------------------------------------------------------------------------>
 
<!------------------------------------------------------------------------------------------------------------------------------>
{{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>
 +
 
 +
 
 +
[[Image:CCalendarDropDownFix.png‎]]
 +
 
 +
 
 +
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>
 +
 
 +
 
 +
Here you can download the sample:<br>
 +
{{Download
 +
|URL=http://samples.tdcommunity.net/index.php?dir=&file=cCalendarDropDown_multimonitor_fix.zip
 +
|TEXT=cCalendarDropDown_multimonitor_fix.zip
 +
}}
 +
 
 +
 
 +
 
 +
[[Category:Child Objects]]
 +
[[Category:Visual Toolchest]]

Latest revision as of 12:18, 29 October 2013

VisualToolchest Calendar Control


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:
Down.png cCalendarDropDown_multimonitor_fix.zip