CustomIcons |
Post Reply |
Author | |||
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
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?
|
|||
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
||
Set CalendarThemeOffice2007.CustomIcons = SomeImageManager.Icons
|
|||
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
||
Great! That seems to have worked.
Now, how and where to I apply an Icon to an event? Thanks for the fast responses. |
|||
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
||
CalendarEvent.CustomIcons
|
|||
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
||
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 |
|||
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
||
NewEvent.CustomIcons.Add ID_PRINT
|
|||
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
||
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?
|
|||
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
||
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 |
|||
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
||
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! |
|||
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
||
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 |
|||
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
||
Serge,
Perfect! Thanks for the help. |
|||
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
||
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! |
|||
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
||
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 |
|||
siva
Newbie Joined: 04 September 2006 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
||
NewEvent.CustomIcons.Add ID_PRINT here what is ID_PRINT ??
|
|||
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
||
id of an icon in an imageManager control.
|
|||
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
|
||
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. |
|||
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
||
No for the moment, but we are working on enabling this possibility for standard Office 2003 theme as well.
We'll consider this feature for implementation in future.
Those views are designed for having only 1 line of text, and all events have the same height. -- WBR, Serge |
|||
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
|
||
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. |
|||
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
||
Actually yes, it would be good. We'll consider this feature for implementing in future.
-- WBR, Serge |
|||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |