Sr. Cristobal,
El mayor calendario no está sincronizado con el más bajo, ver:
function Main()
local oBrush
local oMenu
local oWnd
HB_CDPSELECT("ESWIN")
HB_LangSelect( "ES" )
SET DATE FORMAT "MM/DD/YYYY"
SET DELETE ON
DEFINE BRUSH oBrush COLOR CLR_GRAY
DEFINE WINDOW oWnd MDI BRUSH oBrush
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT SampleCalex():New( oWnd )
oBrush:End()
//SampleCalex():New()
return nil
//----------------------------------------------------------------------------//
METHOD New( oWnd ) CLASS SampleCalex
local oMenu
local oSelf := Self
local oBrush
MENU oMenu
ENDMENU
::dDateStart := Date()
::dDateEnd := Date()
::lOnPreNext := .F.
::cAlias := "citas"
::BuildDbf()
DEFINE BRUSH oBrush COLOR CLR_HGRAY
if Empty( oWnd )
DEFINE WINDOW ::oWnd MDI MENU oMenu BRUSH oBrush
else
DEFINE WINDOW ::oWnd MDICHILD MENU oMenu BRUSH oBrush OF oWnd
endif
::BuildPanels()
::BuildSplitterV()
::BuildExplorer()
::BuildCalex()
// ::AddDates()
ACTIVATE WINDOW oSelf:oWnd MAXIMIZED ;
ON RESIZE oSelf:SetSize( nSizeType, nWidth, nHeight )
oBrush:End()
RETURN Self
//----------------------------------------------------------------------------//
METHOD BuildPanels() CLASS SampleCalex
local oBrush
local oParent
if ::oWnd:ClassName() == "TMDICHILD"
oParent := ::oWnd
else
oParent := ::oWnd:oWndClient
endif
::oPanelExplorer := TPanel():New( 1, 0, ::oWnd:nHeight, 280, oParent )
::oPanelCalex := TPanel():New( 1, ::oPanelExplorer:nWidth + 6, ::oWnd:nHeight, ::oWnd:nWidth - ::oPanelExplorer:nWidth + 6, oParent )
DEFINE BRUSH oBrush COLOR CLR_WHITE
::oPanelExplorer:SetBrush( oBrush )
::oPanelCalex:SetBrush( oBrush )
oBrush:End()
Return nil
//---------------------------------------------------//
tcalex.prg:
//----------------------------------------------------------------------------//
FUNCTION Calex_SetFirstDate( nFirst )
// local nOldValue
//
// static nFirstDate := 0
//
// nOldValue := nFirstDate
//
// if PCount() > 0
// nFirstDate := Min( Max( 1, nFirst ), 7 ) - 1
// endif
return -1 <---------------------------------- nOldValue para -1
tmonthv.prg:
METHOD SetDate( dDate ) CLASS TMonthView
...
::dEnd := ::dStart + 34
::nWks := 6 <------------------------------ De 5 para 6
...
METHOD PaintHeader( hDC ) CLASS TMonthView
//local dFirstDateWeek := ::GetFirstDateWeek( ::dDate ) //::dDate - DoW( ::dDate ) + 1
local dFirstDateWeek := ::dDate - DoW( ::dDate ) + 1 <-------------------------
DEFINE CALEX ::oCalex OF ::oPanelCalex ;
FROM 1, 10 TO 600, 600 ;
FIRST_DATE 1 ALL //TOP //LEFT //BOTTOM //RIGHT
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 72 guests