CustomIcons
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=4737
Printed Date: 22 November 2024 at 3:35pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: CustomIcons
Posted By: jcollier
Subject: CustomIcons
Date Posted: 04 August 2006 at 11:11am
I was glad to see the ability to use custom icons for events in 10.3. However, is there any way to use icons that are in ImageManager?
|
Replies:
Posted By: SuperMario
Date Posted: 04 August 2006 at 12:24pm
Set CalendarThemeOffice2007.CustomIcons = SomeImageManager.Icons
|
Posted By: jcollier
Date Posted: 04 August 2006 at 1:51pm
Great! That seems to have worked.
Now, how and where to I apply an Icon to an event?
Thanks for the fast responses.
|
Posted By: SuperMario
Date Posted: 04 August 2006 at 2:40pm
CalendarEvent.CustomIcons
|
Posted By: jcollier
Date Posted: 04 August 2006 at 3:31pm
I tried the following but I get an error "Invalid use of property" on the CustomIcons line. I must have a typo?
Set NewEvent = Calendar.DataProvider.CreateEvent NewEvent.StartTime = Now NewEvent.EndTime = Now NewEvent.Subject = "New Event" NewEvent.CustomIcons (ID_PRINT)
Calendar.DataProvider.AddEvent NewEvent Calandar.Populate
|
Posted By: SuperMario
Date Posted: 04 August 2006 at 3:37pm
NewEvent.CustomIcons.Add ID_PRINT
|
Posted By: jcollier
Date Posted: 04 August 2006 at 4:33pm
Ok, that prevents the error from popping up but it doesn't show any icons. The icon is 16X16. In this case, does size matter?
|
Posted By: sserge
Date Posted: 07 August 2006 at 1:40pm
Actually, yes
Icons are printed as is and only when there is enough free space for them. By default 16x16 will be visible only with big events rectangles in the DayView. The size of custom icons in the Calendar VB sample is (16 x 11). Also you can set events height bigger using theme 2007 customization features. (see height formula)
-- WBR, Serge
|
Posted By: jcollier
Date Posted: 07 August 2006 at 2:49pm
Is there a clearer sample of heightformula than the one in the calendar example? I'm having a difficult time finding it. For example, I just want to set the height of the event to 20 or so, so that it will display the entire 16X16 icon.
Thanks!
|
Posted By: sserge
Date Posted: 08 August 2006 at 2:09pm
You can use the following code: CalendarControl.Theme.DayView.Event.HeightFormula.Divisor = 1 CalendarControl.Theme.DayView.Event.HeightFormula.Multiplier = 0 CalendarControl.Theme.DayView.Event.HeightFormula.Constant = 20 ' the same for month vew CalendarControl.Theme.RefreshMetrics CalendarControl.Populate
-- WBR, Serge
|
Posted By: jcollier
Date Posted: 08 August 2006 at 2:48pm
Serge,
Perfect! Thanks for the help.
|
Posted By: jcollier
Date Posted: 11 August 2006 at 9:00am
2 more questions on CustomIcons:
1. Is there a way to show more than 1 icon for 1 event? 2. Is there a way to tell the icon to be visible on either the left or the right side of the event as opposed to only on the right?
Thanks!
|
Posted By: sserge
Date Posted: 16 August 2006 at 3:23pm
1) CustomIcons is a collecton. You can add any number of icon IDs. However, some icons may not be visible because of no space to draw them. This depends on event width.
2) Unfortunately, no.
-- WBR, Serge
|
Posted By: siva
Date Posted: 04 September 2006 at 11:09am
NewEvent.CustomIcons.Add ID_PRINT here what is ID_PRINT ??
|
Posted By: SuperMario
Date Posted: 04 September 2006 at 5:06pm
id of an icon in an imageManager control.
|
Posted By: nighthawk
Date Posted: 03 October 2006 at 4:35pm
Is there a way to use custom icons when not using the Office 2007 theme?
Also, I would really like to have the option to display the icons on the left instead of the right.
Lastly, when you adjust the height settings of the events in the month and week view, is there any way to get the text to wrap to the next line if there is enough vertical room? The event text in the day view does wrap.
|
Posted By: sserge
Date Posted: 04 October 2006 at 7:25am
nighthawk wrote:
Is there a way to use custom icons when not using the Office 2007 theme?
|
No for the moment, but we are working on enabling this possibility for standard Office 2003 theme as well.
nighthawk wrote:
Also, I would really like to have the option to display the icons on the left instead of the right.
|
We'll consider this feature for implementation in future.
nighthawk wrote:
Lastly, when you adjust the height settings of the events in the month and week view, is there any way to get the text to wrap to the next line if there is enough vertical room? The event text in the day view does wrap.
|
Those views are designed for having only 1 line of text, and all events have the same height.
-- WBR, Serge
|
Posted By: nighthawk
Date Posted: 04 October 2006 at 3:33pm
sserge wrote:
nighthawk wrote:
Lastly, when you adjust the height settings of the events in the month and week view, is there any way to get the text to wrap to the next line if there is enough vertical room? The event text in the day view does wrap.
|
Those views are designed for having only 1 line of text, and all events have the same height.
-- WBR, Serge
|
But, adjusting the following parameters:
CalendarControl.Theme.MonthView.Event.HeightFormula.Divisor CalendarControl.Theme.MonthView.Event.HeightFormula.Multiplier CalendarControl.Theme.MonthView.Event.HeightFormula.Constant
CalendarControl.Theme.WeekView.Event.HeightFormula.Divisor CalendarControl.Theme.WeekView.Event.HeightFormula.Multiplier CalendarControl.Theme.WeekView.Event.HeightFormula.Constant
will change the height of the event. Even if the height is changed to provided enough room more more than one line of text, it will still only show one line vertically centered. I would like it to show multiple lines as long as there is enough vertical room.
|
Posted By: sserge
Date Posted: 04 October 2006 at 5:11pm
Actually yes, it would be good. We'll consider this feature for implementing in future.
-- WBR, Serge
|
|