using_20the_20date_20and_20time_20picker
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| using_20the_20date_20and_20time_20picker [2018/03/31 13:19] – external edit 127.0.0.1 | using_20the_20date_20and_20time_20picker [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ==== Output window ==== | ==== Output window ==== | ||
| \\ To display a Date/Time picker on the output window use code similar to the following: | \\ To display a Date/Time picker on the output window use code similar to the following: | ||
| + | <code bb4w> | ||
| INSTALL @lib$+" | INSTALL @lib$+" | ||
| ICC_DATE_CLASSES = &100 | ICC_DATE_CLASSES = &100 | ||
| Line 13: | Line 14: | ||
| hdtp% = FN_createwindow(" | hdtp% = FN_createwindow(" | ||
| + | </ | ||
| Here **x%,y%** is the position at which the Date/Time picker should be displayed, **cx%,cy%** is the size of the Date/Time picker window and **style%** is one of the following values (the figures in brackets are suggested window sizes for the different styles):\\ \\ | Here **x%,y%** is the position at which the Date/Time picker should be displayed, **cx%,cy%** is the size of the Date/Time picker window and **style%** is one of the following values (the figures in brackets are suggested window sizes for the different styles):\\ \\ | ||
| Line 19: | Line 21: | ||
| * **9** - to display a time picker (cx%=72, cy%=20) | * **9** - to display a time picker (cx%=72, cy%=20) | ||
| \\ To read the currently selected date or time from the control use code similar to the following: | \\ To read the currently selected date or time from the control use code similar to the following: | ||
| + | <code bb4w> | ||
| DIM systemtime{Year{l&, | DIM systemtime{Year{l&, | ||
| \ Hour{l&, | \ Hour{l&, | ||
| Line 31: | Line 34: | ||
| minute% = systemtime.Minute.l& | minute% = systemtime.Minute.l& | ||
| second% = systemtime.Second.l& | second% = systemtime.Second.l& | ||
| + | </ | ||
| To close the control use the following code:\\ \\ | To close the control use the following code:\\ \\ | ||
| + | <code bb4w> | ||
| PROC_closewindow(hdtp%) | PROC_closewindow(hdtp%) | ||
| + | </ | ||
| \\ | \\ | ||
| ==== Dialogue box ==== | ==== Dialogue box ==== | ||
| \\ To display a Date/Time picker in a dialogue box use code similar to the following: | \\ To display a Date/Time picker in a dialogue box use code similar to the following: | ||
| + | <code bb4w> | ||
| INSTALL @lib$+" | INSTALL @lib$+" | ||
| ICC_DATE_CLASSES = &100 | ICC_DATE_CLASSES = &100 | ||
| Line 57: | Line 64: | ||
| PROC_showdialog(dtpdlg%) | PROC_showdialog(dtpdlg%) | ||
| + | </ | ||
| Where **style%** has one of the values listed above. Again the size of the Date/Time picker control will need to be modified according to the style, but here the size is specified in dialogue box units rather than pixels (see the main [[http:// | Where **style%** has one of the values listed above. Again the size of the Date/Time picker control will need to be modified according to the style, but here the size is specified in dialogue box units rather than pixels (see the main [[http:// | ||
| + | <code bb4w> | ||
| click% = 0 | click% = 0 | ||
| ON SYS click% = @wparam% AND &FFFF : RETURN | ON SYS click% = @wparam% AND &FFFF : RETURN | ||
| Line 83: | Line 92: | ||
| PROC_closedialog(dtpdlg%) | PROC_closedialog(dtpdlg%) | ||
| + | </ | ||
| You will want to use **ON ERROR** and **ON CLOSE** statements to ensure that " | You will want to use **ON ERROR** and **ON CLOSE** statements to ensure that " | ||
using_20the_20date_20and_20time_20picker.1522502390.txt.gz · Last modified: 2024/01/05 00:16 (external edit)