C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

C1 Calendar with SuperToolTip

rated by 0 users
This post has 8 Replies | 1 Follower

Not Ranked
Posts 7
shai_au Posted: Tue, Jan 6 2009 11:24 PM

Hi All,

Some guidance please.

I have a set of events and their dates in a DB which I would like to show as bold days in a C1Calendar control. I then want to be able to hover over that date to display a SuperToolTip with the events details.

 Can this be done?

 Thanks

Shai

Top 25 Contributor
Posts 576
C1_IrinaP replied on Sat, Jan 10 2009 10:10 AM
> Some guidance please.
>
> I have a set of events and their dates in a DB which I would like to show as bold days
> in a C1Calendar control. I then want to be able to hover over that date to display a
> SuperToolTip with the events details.
>
> Can this be done?

This feature will be available in 2009 V1 version.

You should subscribe to C1Calendar.BeforeDayTooltipShow event and supply desired html
formatting in event handler for this event:

private void c1Calendar1_BeforeDayTooltipShow(object sender,
BeforeDayTooltipShowEventArgs e)
{
if (e.Day.DayOfWeek == DayOfWeek.Sunday)
{
e.Text = "Sunday";
}
else
{
e.Cancel = true;
}
}
Not Ranked
Posts 7
shai_au replied on Mon, Jan 19 2009 1:04 AM

Hi Irina,

Thank you for your reply.

When will V1 2009 be available?

The code you have given is relevant to the new version?

 

Thanks

Shai

Top 25 Contributor
Posts 576
C1_IrinaP replied on Mon, Jan 19 2009 7:41 AM
> When will V1 2009 be available?
>
> The code you have given is relevant to the new version?
Yes.

I'm not aware about release date.
Untested build is available here:
http://download3.componentone.com/pub/Net/c1schedule/misc/C1Schedule.2_2.0.20091.92.zip

You can use it for development puproses while waiting for release version.
Not Ranked
Posts 7
shai_au replied on Tue, Jan 20 2009 7:30 PM

Thanks Irina,

 Ive downloaded the untested build, copied the C1.Win.C1Schedule.2.dll and C1.Win.C1Schedule.2.XML files to

 C:\Program Files\ ComponentOne Studio.NET 2.0\bin  and P:\QFG-EnquiryCentre\bin\debug

but still get the following build errors

The type or namespace name 'C1Schedule' does not exist in the namespace 'C1.Win' (are you missing an assembly reference?) 

P:\QFG-EnquiryCentre\ucSeminar.cs 
Error 2 The type or namespace name 'C1Schedule' does not exist in the namespace 'C1.Win' (are you missing an assembly reference?) 

 

Top 25 Contributor
Posts 576
C1_IrinaP replied on Wed, Jan 21 2009 3:02 AM
Try to remove C1Schedule reference from your project, add it back and re-build.
Not Ranked
Posts 7
shai_au replied on Wed, Jan 21 2009 6:30 PM

Excellent, that worked! Thank you.

Unfortunately I get runtime errors, something about Thickness not being a valid Int32, and other FormatExceptions when I load the form that parents the Calender control.

I guess I'll just have to wait till the next version is released. :(

Thanks for your help.

Top 25 Contributor
Posts 576
C1_IrinaP replied on Thu, Jan 22 2009 7:47 AM
> Excellent, that worked! Thank you.
>
> Unfortunately I get runtime errors, something about Thickness not being a valid Int32,
> and other FormatExceptions when I load the form that parents the Calender control.
I haven't heard of such issues.
Try to reset VisualStyle of all C1Calendar and C1Schedule controls on your form (you can
do that at design-time from context menu).
If issue persists, send me (to IrinaP at componentone.com) either the simple application
reproducing the problem or full exception stack trace.
Not Ranked
Posts 7
shai_au replied on Thu, Jan 22 2009 4:33 PM

I had to remove the following two lines of code form the designer.cs for my form:

 

this.calEvents.Theme.XmlDefinition = resources.GetString("resource.XmlDefinition");

this.calEvents.VisualStyle = C1.Win.C1Schedule.UI.VisualStyle.Custom;

I then had to reset my custom appearance and it worked.

 

Thanks.

Page 1 of 1 (9 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.