We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MonthCalendarAdv Today button customization

Thread ID:

Created:

Updated:

Platform:

Replies:

95422 Jul 7,2010 02:51 PM UTC Jul 14,2010 01:24 PM UTC Windows Forms 3
loading
Tags: Tools
Johnathan Tunnicliffe
Asked On July 7, 2010 02:51 PM UTC

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?

Johnathan Tunnicliffe
Replied On 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.

Ramya D [Syncfusion]
Replied On 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

Ramya D [Syncfusion]
Replied On 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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;