[Wnd-commit] wnd/wnd_doc/doc/controls/control classes/datepicker .CVSIGNORE,NONE,1.1 datepicker.dtpl
Status: Alpha
Brought to you by:
jurner
|
From: jürgen u. <cer...@us...> - 2005-07-23 19:50:18
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/controls/control classes/datepicker In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2837 Added Files: .CVSIGNORE datepicker.dtpl Log Message: bit of this and a bit of that --- NEW FILE: .CVSIGNORE --- *.html *.gif --- NEW FILE: datepicker.dtpl --- ::defaultpage:: datepicker ::site:: Datepicker <IMG SRC="Datepicker.gif"></IMG> <br><br> <a HREF="contents.html">Datepicker contents</a> <br><br> ::site:: class DatepickerFromHandle <code class=import>defined in: wnd.controls.datepicker</code><br><br> <code>DatepickerFromHandle(hwnd, *styles)</code><br> <P> Wraps Datepicker methods around a hwnd. <br><br> Styles can be 'debug' or 'debugall'. </P> ::site:: class Datepicker <code class=import>defined in: wnd.controls.datepicker</code><br><br> <code>Datepicker(parent, x, y, w, h, *styles)</code><br> ::site:: Datepicker messages A Datepicker control sends the following messages to the message handler:<br> <DL> <DT>'datechange' <DD><br>the date has beenn changed wp=a ||type-SYSTEMTIME|| struct containing the new date or None if the checkbox is in 'shownone' style and the checkbox is not checked<br> lp=flag: 'valid', 'none', 'error' or 'unknown', giving additional information how about the ||type-SYSTEMTIME|| being passed. You should use the ||type-SYSTEMTIME|| structure only if the 'valid' flag is set. 'none' indicates that the cobtrol contains no date at all. <br><br> <DT>'closemonthcal' <DD><br>the monthcalendar is about to be closed wp=allways zero<br> lp=allways zero <br><br> <DT>'killfocus' <DD>the checkbox has lost keyboard focus<br> wp=window handle of the window gaining the focus or zero lp=allways zero<br> <DT>'openmonthcal' <DD><br>the monthcalendar is about to be opend wp=allways zero<br> lp=allways zero <br><br> <DT>'setfocus' <DD>the checkbox has received keyboard focus<br> wp=window handle of the window loosing the focus or zero lp=allways zero <br><br> <DT>'userstring' <DD>the user entered a sting into the control<br> wp= a ||type-SYSTEMTIME|| lp= the string the user entered ||type-SYSTEMTIME|| according to the user input. You may return True to indicate the input is valid or False to set the control to no date status. The return values are used only for controls with the 'shownone' style set. <br><br> In response to this message you should fill in the passed <br><br> This message is send only if the control has the 'appcanparse' style set <br><br> </DL> ::site:: Datepicker styles The following styles are used with Datepicker controls:<br><br> <TABLE class="table1" BORDER="1"> <TR> <TD>'appcanparse'</TD> <TD>the application can parse user input, the 'userstring' message is send</TD> </TR> <TR> <TD>'longdateformat'</TD> <TD>displays long date like: Friday, April 19, 1996.</TD> </TR> <TR> <TD>'rightalign'</TD> <TD>the callendar arrow will be right aligned</TD> </TR> <TR> <TD>'shownone'</TD> <TD>displays a checkbox next to the date. You may retrieve the date from the control only if it is checked by the user </TD> </TR> <TR> <TD>'shortdateformat'</TD> <TD>displays the date in short form: 22.1.05</TD> </TR> <TR> <TD>'timeformat'</TD> <TD>displays time instead of date</TD> </TR> <TR> <TD>'updown'</TD> <TD>displays an Updown control instead of the calendar arrow</TD> </TR> </TABLE> ::folder:: Datepicker methods Datepicker controls support the following methods: <a HREF="||method-ctrl||">Common methods</a> ::item:: SetFormat <code>SetFormat(format)</code><br> <P>Sets the format how date and time is displayed in the control.<br> Use a combination of the following format strings: <DL> <DT>d</DT> <DD> The one- or two-digit day. <DT>dd</DT> <DD> The two-digit day. Single-digit day values are preceded by a zero. </DD> <DT>ddd</DT> <DD> The three-character weekday abbreviation. </DD> <DT>dddd</DT> <DD> The full weekday name.</DD> <DT>h</DT> <DD> The one- or two-digit hour in 12-hour format. </DD> <DT>hh</DT> <DD> The two-digit hour in 12-hour format. Single-digit values are preceded by a zero. </DD> <DT>H</DT> <DD> The one- or two-digit hour in 24-hour format. </DD> <DT>HH</DT> <DD> The two-digit hour in 24-hour format. Single-digit values are preceded by a zero. </DD> <DT>m</DT> <DD> The one- or two-digit minute. </DD> <DT>mm</DT> <DD> The two-digit minute. Single-digit values are preceded by a zero. </DD> <DT>M</DT> <DD> The one- or two-digit month number. </DD> <DT>MM</DT> <DD> The two-digit month number. Single-digit values are preceded by a zero. </DD> <DT>MMM</DT> <DD> The three-character month abbreviation. </DD> <DT>MMMM</DT> <DD> The full month name. </DD> <DT>t</DT> <DD> The one-letter AM/PM abbreviation (that is, AM is displayed as A). </DD> <DT>tt</DT> <DD> The two-letter AM/PM abbreviation (that is, AM is displayed as AM). </DD> <DT>X</DT> <DD> make it a callback field. Not yet implemented</DD> <DT>y</DT> <DD>The one-digit year (that is, 1996 would be displayed as 6). </DD> <DT>yy</DT> <DD> The last two digits of the year (that is, 1996 would be displayed as 96). </DD> <DT>yyy</DT> <DD> The full year (that is, 1996 would be displayed as 1996). </DD> </DL> <br> It is possible to include non formating chars in the string by enclosing them in single quotes. <pre> SetFormat(" 'today is' dd ':' mm ':' yy") >> today is 30 : 1 : 05 </pre> </P> ::item:: GetMonthcal <code>GetMonthcal()</code><br> <P>Returns a Monthcal instance wrapped aroung the the handle of the controls monthcalendar.<br> <br> This instance is only valid when the calendar is actually displayed. No check is done to enshure this.<br> <br> Use this only in response to a 'openmonthcal' message, to play additional tricks on the month calendar.<br> As soon as the 'closemonthcal' message is send the Hwnd of the Monthcal instance becomes invalid. </P> ::item:: GetMonthcalBkColor <code>GetMonthcalBkColor()</code><br> <P>Returns the background ||type-COLORREF|| color of the monthcalendar. </P> ::item:: GetMonthcalMonthBkColor <code>GetMonthcalMonthBkColor()</code><br> <P>Returns the month background ||type-COLORREF|| color of the monthcalendar. </P> ::item:: GetMonthcalTextColor <code>GetMonthcalTextColor()</code><br> <P>Returns the text ||type-COLORREF|| color of the monthcalendar. </P> ::item:: GetMonthcalTitleTextColor <code>GetMonthcalTitleTextColor()</code><br> <P>Returns the title text ||type-COLORREF|| color of the monthcalendar. </P> ::item:: GetMonthcalTrailingTextColor <code>GetMonthcalTrailingTextColor()</code><br> <P>Returns the trailing text ||type-COLORREF|| color of the monthcalendar.<br> This is the color of days taken from previous or following months. </P> ::item:: SetMonthcalBkColor <code>SetMonthcalBkColor(colorref)</code><br> <P>Sets the background ||type-COLORREF|| color of the monthcalendar. <br>Return value is the previous ||type-COLORREF|| value </P> ::item:: SetMonthcalMonthBkColor <code>SetMonthcalMonthBkColor()</code><br> <P>Sets the month background ||type-COLORREF|| color of the monthcalendar. <br>Return value is the previous ||type-COLORREF|| value </P> ::item:: SetMonthcalTextColor <code>SetMonthcalTextColor()</code><br> <P>Sets the text ||type-COLORREF|| color of the monthcalendar. <br>Return value is the previous ||type-COLORREF|| value </P> ::item:: SetMonthcalTitleTextColor <code>SetMonthcalTitleTextColor()</code><br> <P>Sets the title text ||type-COLORREF|| color of the monthcalendar. <br>Return value is the previous ||type-COLORREF|| value </P> ::item:: SetMonthcalTrailingTextColor <code>SetMonthcalTrailingTextColor()</code><br> <P>Sets the trailing text ||type-COLORREF|| color of the monthcalendar.<br> This is the color of days taken from previous or following months. <br>Return value is the previous ||type-COLORREF|| value </P> ::item:: GetMonthcalFont <code>GetMonthcalFont()</code><br> <P>Returns the handle of the font the monthcal is currently using </P> ::item:: SetRange <code>SetRange(systemtimeMin, systemtimeMax)</code><br> <P>Sets the maximum and minimum allowable ranges for the Datepicker.<br> systemtimeMin and systemtimeMax should be filled in ||type-SYSTEMTIME|| structures or None ifd you don't want to touch a certain limit. </P> ::item:: GetRange <code>GetRange()</code><br> <P>Returns the current range of the Datepicker<br> Return value is <bold>list[None, None]</bold> if no limits are currently set. If a minimum is currently set <bold>list[0]</bold> will be a ||type-SYSTEMTIME|| structure containing the minimum range. <br> If maximum range is set <bold>list[1]</bold> will hold a ||type-SYSTEMTIME|| structure containing the maximum range. </P> ::item:: SetTime <code>SetTime(systemtime)</code><br> <P>Sets the current time of the Datepicker control.<br> systemtime should be a filled in ||type-SYSTEMTIME|| structure. <br><br> </P> ::item:: GetTime <code>GetTime()</code><br> <P>Returns the current time of the Datepicker control.<br> Return value is a ||type-SYSTEMTIME|| structure. <br><br> Note:<br> Only these members of the ||type-SYSTEMTIME|| are valid wich corrospond to the current time format set. All others are arbitrary values. And as you may have noticed there is no <bold>GetFormat</bold> method available. </P> |