DTPICKER show 1 Year

DTPICKER show 1 Year

Postby Jimmy » Tue May 09, 2023 11:37 pm

hi,

when using DTPICKER i got a Control where i can open Calendar
how to open Calendar at INIT :?:

i like to show 1 Year Calendar like this "only" ( no Action )
Image
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: DTPICKER show 1 Year

Postby Silvio.Falconi » Wed May 10, 2023 9:44 am

I think you must create a dialog with 12 calendar controls
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7066
Joined: Thu Oct 18, 2012 7:17 pm

Re: DTPICKER show 1 Year

Postby Jimmy » Wed May 10, 2023 4:18 pm

hi Silvio,

thx for Answer

ok, got it : wrong Control :roll:
instead of DTPICKER (SysDateTimePick32) i have to use CALENDAR (SysMonthCal32)

but i got a Problem with CALENDAR : NO Events :shock:

ACTION and DblClick seems not to work in Sample
c:\fwh\samples\testcal.prg
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: DTPICKER show 1 Year

Postby Silvio.Falconi » Wed May 10, 2023 5:13 pm

No you must use tcalendar class, no datepick class
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7066
Joined: Thu Oct 18, 2012 7:17 pm

Re: DTPICKER show 1 Year

Postby Jimmy » Wed May 10, 2023 7:30 pm

hi Silvio,
Silvio.Falconi wrote:No you must use tcalendar class, no datepick class

got it
Image

but as i say it does not "react" on Event :shock:
Code: Select all  Expand view  RUN
PROCEDURE ShowCalendar()
LOCAL oDlg, oCal
LOCAL dFirst := DATE()

   DEFINE WINDOW oDlg FROM 0, 0 TO 768, 1100 PIXEL TITLE "Calendar" ICON "A1MAIN" ;
         COLOR BFcolor, BGcolor NOMINIMIZE NOMAXIMIZE

      @  0,  0 CALENDAR oCal VAR dFirst FONT oFontDefault OF oDlg ;
              COLOR BFcolor, BGcolor ;
              DBLCLICK MsgInfo( oCal:GetDate() ) ;
              ON CHANGE( oDlg:Update() ) WEEKNUMBER ;
              ACTION( MsgInfo( "ok" ) )                               //  , oCal:End(), oDlg:End() )

      // NEED for Color
      SetWindowTheme( oCal:hWnd, "", "" )

      oCal:SetBackGround( BGcolor )
      oCal:SetMonthBk( BGcolor )
      oCal:SetTitleBk( CLR_GRAY )
      oCal:SetTextClr( BFcolor )
      oCal:SetTitleText( BFcolor )
      oCal:SetTrailingText( CLR_GRAY )

      oDlg:oClient := oCal

      oDlg:bKeyDown := { | nKey, nFlag | IF( nKey = VK_ESCAPE, oDlg:End(), nil ) }
      oCal:bKeyDown := { | nKey, nFlag | IF( nKey = VK_ESCAPE, oDlg:End(), nil ) }

#IFDEF __HMG__
   END WINDOW
#endif

   ACTIVATE WINDOW oDlg CENTERED

RETURN


p.s. when use DIALOG it will display only small 1 Month Calendar ... why :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: DTPICKER show 1 Year

Postby Jimmy » Sat May 13, 2023 8:35 pm

hi,

i have Problem with CALENDAR Control as i seem not to "react" on (any) Event :shock:

---

i found in CLASS TCalendar
Code: Select all  Expand view  RUN
  METHOD HandleEvent()  VIRTUAL

i wonder as CLASS TDatePick did not have METHOD HandleEvent() which is about the same Control

---

i have made a copy of CLASS TCalendar and include it in App.

when remove
Code: Select all  Expand view  RUN
  METHOD HandleEvent()  VIRTUAL

it work on VK_RETURN or VK_ESCAPE or other Event :D

so what does VIRTUAL mean in CLASS TCalendar :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 85 guests