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 )
Silvio.Falconi wrote:No you must use tcalendar class, no datepick class
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
METHOD HandleEvent() VIRTUAL
METHOD HandleEvent() VIRTUAL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 38 guests