FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Visible Months in TCalendar
Posts: 82
Joined: Fri Mar 03, 2006 06:26 PM
Visible Months in TCalendar
Posted: Sat Sep 21, 2013 02:08 PM

Hi Friends

Using TCalendar, I want to show only one month at a time when scrolling through a range of dates, but it defaults to 2.
How does it determine how many are made visible?

TIA
David

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Visible Months in TCalendar
Posted: Sat Sep 21, 2013 06:10 PM
David,

possible displayed numbers of MONTH,
belongs to the given SIZE ( autoadjusted ) :



4 month vertical display ( from sample TESTCAL.prg ) :

@ 2, 001 CALENDAR oCal2 VAR dDate3, dDate4 OF oWnd PIXEL MULTISELECT DAYSTATE;
DBLCLICK MsgInfo( oCal2:GetDate() ) SIZE 250, 700 COLOR CLR_WHITE, CLR_HRED
oCal2:SetDateRange( dDate1, dDate4 )
oCal2:bGotFocus := {|| oCal2:SetTitleBk( CLR_BLUE ) }
oCal2:bLostFocus := {|| oCal2:SetTitleBk( CLR_HRED ) }
nMax = oCal2:GetMaxSelCount()
OnGetState( oCal2, lSunday, lSaturday )
oCal2:SetDayState()
oCal2:bOnGetState = { | oCal | OnGetState( oCal, lSunday, lSaturday ) }




Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 82
Joined: Fri Mar 03, 2006 06:26 PM
Re: Visible Months in TCalendar
Posted: Sun Sep 22, 2013 10:32 AM

Uwe,

Your example works well for me with SIZE controlling the number of months when the control is on a Window. However, I want to use the control on a Dialog. When I size the dialog to accommodate two vertical months it works well with Win7 but shows a cropped 2 x 2 months when running on XP.

I suppose the easiest thing to do now is to use a Window :(

Regards
David

Continue the discussion