Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - How to change the Header-Date-Format in MonthView?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to change the Header-Date-Format in MonthView?

 Post Reply Post Reply
Author
Message
Jebo View Drop Down
Senior Member
Senior Member


Joined: 27 October 2005
Location: Germany
Status: Offline
Points: 318
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jebo Quote  Post ReplyReply Direct Link To This Post Topic: How to change the Header-Date-Format in MonthView?
    Posted: 13 January 2009 at 8:23am
Hi, I want to change the Header-Date-Format in MonthView to "dd MMM" (see screenshot at 22 Feb). But how can I do that?

I was trying:

With cal.MonthView
    .DayHeaderFormatShort = "dd MMM"
    .DayHeaderFormatMiddle = "dd MMM"
    .DayHeaderFormatLong = "dd MMM"
    .DayHeaderFormatShortest = "dd MMM"
End With

...but absolutly NOTHING will be changed. What do I wrong please?


Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2009 at 12:26pm

Try this

With CalendarControl.MonthView
    .DayHeaderFormatShort = "MMM dd "
    .DayHeaderFormatMiddle = "MMM dd"
    .DayHeaderFormatLong = "MMM dd "
    .DayHeaderFormatShortest = "MMM dd"
End With

and Select Non Office2007 theme
Back to Top
Jebo View Drop Down
Senior Member
Senior Member


Joined: 27 October 2005
Location: Germany
Status: Offline
Points: 318
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jebo Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2009 at 12:29pm
Thx, but argh... ...I want it in Office07-Theme!

Is there no way to format the headers in Office07-Theme? ;-(
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2009 at 1:06pm
In Office2007 theme settings take from locale - not from the user

CString strMonth = CXTPCalendarUtils::GetLocaleString(LOCALE_SABBREVMONTHNAME1 + nMonth - 1, 100);

//LOCALE_IDATE - short date format ordering

// 0 Month-Day-Year

// 1 Day-Month-Year

// 2 Year-Month-Day

int nDateOrdering = CXTPCalendarUtils::GetLocaleLong(LOCALE_IDATE);

if (nDateOrdering == 1)

strTextLeft.Format(_T("%d %s"), nDay, (LPCTSTR)strMonth);

else

strTextLeft.Format(_T("%s %d"), (LPCTSTR)strMonth, nDay);
 
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2009 at 6:01pm
Well - I did it but this is different setting to change as it related to another mode.
In VB you need to call smth like
    CalendarControl.SetLongDayHeaderFormat ("MMMM d")
and same time use your old code - related to Non-Office2007 mode
    With CalendarControl.MonthView
    .DayHeaderFormatShort = "d"
    .DayHeaderFormatMiddle = "MMM d"
    .DayHeaderFormatLong = "MMMM d"
    .DayHeaderFormatShortest = "d"
    End With
BE IN Release 13 SOON
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 14 January 2009 at 4:09pm
because this is different properties and user can have different formats for different themes
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.