Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #10069
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Month selector |
| Date | 2016-12-15 18:25 +0100 |
| Message-ID | <ebg1vvF6p3nU1@mid.individual.net> (permalink) |
| References | <b30ab6dc-18be-4a96-864c-3bcbdc4c8cb8@googlegroups.com> <ebdh6jFil8dU1@mid.individual.net> <5caec2e2-9b90-44d4-954e-fc4bfe7e8b68@googlegroups.com> |
Hi Sebastian,
>
> METHOD Dispatch(oEvent) CLASS MonthSelector
>
on control level you don“t receive a DTN_DROPDOWN. What you can do is to use
a window base class ( assuming in the example that your DTPickers are
sitting on DataDialogs ) and a DTPicker class.
-----------------------------
CLASS BaseDataDialog INHERIT DataDialog
METHOD ControlNotify(oEvent) CLASS BaseDataDialog
LOCAL pnMHDR AS _winNMHDR
LOCAL oDP AS DateTimePicker
DO CASE
CASE DWORD ( oEvent:NotifyCode ) == DTN_DROPDOWN
pnMHDR := PTR ( _CAST , oEvent:lParam )
oDP := GetObjectByHandle ( pnMHDR.hwndFrom )
IF oDP != NULL_OBJECT .AND. IsMethod ( oDP , #__SetView )
Send ( oDP , #__SetView )
ENDIF
ENDCASE
RETURN SUPER:ControlNotify(oEvent)
------------------------------------
the required DTPicker class
-----------------------------------
CLASS BaseDateTimePicker INHERIT DateTimePicker
PROTECT _nView := MCMV_DAY AS INT // Default is day-view
METHOD __SetView() CLASS BaseDateTimePicker
LOCAL hMonthControl AS PTR
hMonthControl := SendMessage(SELF:Handle() , DTM_GETMONTHCAL , 0 , 0L )
SendMessage( hMonthControl, MCM_SETCURRENTVIEW, 0 , _nView )
RETURN SELF
ASSIGN View ( nView ) CLASS BaseDateTimePicker
// MCMV_CENTURY
// MCMV_DAY
// MCMV_DECADE
// MCMV_MONTH
_nView := nView
RETURN nView
----------
as long as you do not assign a value > MCMV_DAY to <oDP>:View, the dropdown
calendar is shown in day-view.
regards
Karl-Heinz
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Month selector ccyasa.sbassano@gmail.com - 2016-12-14 07:33 -0800
Re: Month selector "Karl-Heinz" <invalid@invalid.invalid> - 2016-12-14 19:26 +0100
Re: Month selector ccyasa.sbassano@gmail.com - 2016-12-14 13:04 -0800
Re: Month selector ccyasa.sbassano@gmail.com - 2016-12-15 04:47 -0800
Re: Month selector "Karl-Heinz" <invalid@invalid.invalid> - 2016-12-15 18:25 +0100
Re: Month selector ccyasa.sbassano@gmail.com - 2016-12-15 10:23 -0800
Re: Month selector "Karl-Heinz" <invalid@invalid.invalid> - 2016-12-15 19:24 +0100
Re: Month selector ccyasa.sbassano@gmail.com - 2016-12-15 10:34 -0800
Re: Month selector ccyasa.sbassano@gmail.com - 2016-12-17 03:47 -0800
Re: Month selector D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2016-12-18 18:01 +0100
Re: Month selector "Karl-Heinz" <invalid@invalid.invalid> - 2016-12-19 08:58 +0100
Re: Month selector ccyasa.sbassano@gmail.com - 2016-12-20 11:39 -0800
Re: Month selector "Karl-Heinz" <invalid@invalid.invalid> - 2016-12-21 06:47 +0100
csiph-web