Visible Months in TCalendar

Visible Months in TCalendar

Postby David Williams » Sat Sep 21, 2013 2: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
User avatar
David Williams
 
Posts: 82
Joined: Fri Mar 03, 2006 6:26 pm
Location: Ireland

Re: Visible Months in TCalendar

Postby ukoenig » Sat Sep 21, 2013 6:10 pm

David,

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

Image

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 ) }


Image

Best Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Visible Months in TCalendar

Postby David Williams » 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
User avatar
David Williams
 
Posts: 82
Joined: Fri Mar 03, 2006 6:26 pm
Location: Ireland


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 92 guests