Daniel and Crespo
a very good job , I have tested it and this my first improvement .
Maurizio
http://www.nipeservice.com
METHOD RButtonDown( nRow, nCol, nKeyFlags ) CLASS TCalEx
Local oMenu
Local oThis := self
if ::Classname() != "TDAYVIEW" .or. ::Classname() != "TWEEKVIEW"
if ::bRClicked != nil
return Eval( ::bRClicked, nRow, nCol, nKeyFlags, Self )
endif
MENU oMenu POPUP
MENUITEM "New appointment" ACTION msginfo("New Record")
MENUITEM "Today" ACTION (::SetDate( date() ) ,::oDayView:refresh())
MENUITEM "Go to date " ACTION (::GotoDate(nRow, nCol) ,::oDayView:refresh())
MENUITEM "Interval"
MENU
MENUITEM "5 minutes" ACTION (::oDayView:SetInterval( 5 ) ,::oDayView:refresh())
MENUITEM "10 minutes" ACTION (::oDayView:SetInterval( 10 ) ,::oDayView:refresh())
MENUITEM "15 minutes" ACTION (::oDayView:SetInterval( 15 ) ,::oDayView:refresh())
MENUITEM "20 minutes" ACTION (::oDayView:SetInterval( 20 ) ,::oDayView:refresh())
MENUITEM "30 minutes" ACTION (::oDayView:SetInterval( 30 ) ,::oDayView:refresh())
MENUITEM "60 minutes" ACTION (::oDayView:SetInterval( 60 ) ,::oDayView:refresh())
ENDMENU
ENDMENU
ACTIVATE POPUP oMenu OF oThis AT nRow, nCol
ENDIF
return nil
#include "dtpicker.ch"
METHOD GotoDate() CLASS TCalEx //add by silvio
LOCAL oDlg, oGet, lChg:=.F. ,oBut[2]
LOCAL dDate:=Date()
DEFINE DIALOG oDlg SIZE 210,80 TITLE "Go to a date"
@ 0.8,2 DTPICKER oGet VAR dDate OF oDlg SIZE 80,10;
ON CHANGE oGet:Refresh()
@ 0.2, 2 SAY "Select a new date" OF oDlg SIZE 80,7
@ 28, 2 BUTTON oBut[1] Prompt "&Confirm" SIZE 30, 10 PIXEL OF oDlg ACTION (lChg:=.T.,oDlg:End())
@ 28, 35 BUTTON oBut[2] Prompt "Ca&ncel" SIZE 30, 10 PIXEL OF oDlg ACTION (lChg:=.F.,oDlg:End()) CANCEL
ACTIVATE DIALOG oDlg CENTER
IF lChg
::SetDate(dDate)
ENDIF
RETURN (NIL)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 46 guests