MonthCalendarAdv Today button customization

What are the options to customize this button?

By the looks of it we can only set one of the predefined styles and then it is up to the style to decide whether it wants to use the custom properties we've set.

The closest I've got is using the officeXP or office2003 styles but the colors when you hover/click on the Today button are not to my liking. Is there anyway to customize them?

3 Replies

JT Johnathan Tunnicliffe July 8, 2010 09:35 AM UTC

Also, if you hide the Today button then it leaves an ugly space underneath the calendar space. Surely the control should resize to remove this space if both the None button and the Today buttons are hidden.


RD Ramya D Syncfusion Team July 14, 2010 01:19 PM UTC

Hi Johnathan,

Thanks for your interest in Syncfusion products.

By default, you cannot the change BackGround appearance for Buttons, but you can achieve it by changing background for Buttons as shown below.

public Form1()
{
InitializeComponent();
this.monthCalendarAdv1.TodayButton.ImageIndex = 1;
}
private void monthCalendarAdv1_TodayButton_MouseUp(object sender, MouseEventArgs e)
{
this.monthCalendarAdv1.TodayButton.BackColor = Color.Red;
}
private void monthCalendarAdv1_TodayButton_MouseDown(object sender, MouseEventArgs e)
{
this.monthCalendarAdv1.TodayButton.BackColor = Color.Red;
}


Also you can resize the bottom size by using BottomHeight property in MonthCalendarAdv as shown below.

int height = this.monthCalendarAdv1.TodayButton.Height;
this.monthCalendarAdv1.TodayButton.Visible = !this.monthCalendarAdv1.TodayButton.Visible;
this.monthCalendarAdv1.NoneButton.Visible = !this.monthCalendarAdv1.NoneButton.Visible;
if (monthCalendarAdv1.TodayButton.Visible == false && monthCalendarAdv1.TodayButton.Visible == false)
this.monthCalendarAdv1.BottomHeight = 0;
else
this.monthCalendarAdv1.BottomHeight = height;


Refer the sample from below link.
MyCalendar844553135.zip

Please let me know if you have any further queries.

Regards,
Ramya.D


RD Ramya D Syncfusion Team July 14, 2010 01:24 PM UTC

Hi,

Regret for the inconvenience caused.

Refer the sample from following link. http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=MyCalendar844553135.zip

Please let me know if you have queries.

Regards,
Ramya D.

Loader.
Up arrow icon