Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - CustomIcons
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CustomIcons

 Post Reply Post Reply
Author
Message
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Topic: CustomIcons
    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?
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 04 August 2006 at 12:24pm
Set CalendarThemeOffice2007.CustomIcons = SomeImageManager.Icons
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 04 August 2006 at 2:40pm
CalendarEvent.CustomIcons

Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post 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


Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 04 August 2006 at 3:37pm
NewEvent.CustomIcons.Add ID_PRINT
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post 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? 
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2006 at 2:48pm
Serge,

Perfect!  Thanks for the help.
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
siva View Drop Down
Newbie
Newbie


Joined: 04 September 2006
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote siva Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2006 at 11:09am
NewEvent.CustomIcons.Add ID_PRINT    here what is ID_PRINT  ??
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2006 at 5:06pm
id of an icon in an imageManager control.
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 04 October 2006 at 7:25am
Originally posted by nighthawk 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.

Originally posted by nighthawk 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.

Originally posted by nighthawk 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
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 04 October 2006 at 3:33pm
Originally posted by sserge sserge wrote:


Originally posted by nighthawk 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.
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 04 October 2006 at 5:11pm
Actually yes, it would be good. We'll consider this feature for implementing in future.

--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.155 seconds.