Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Different Styles for Same Appt Possible? (Read 2812 times)
BudMan
YaBB Newbies
*
Offline


Credidi me felem vidisse

Posts: 45
Joined: Jul 14th, 2007
Different Styles for Same Appt Possible?
Mar 14th, 2008 at 4:32pm
Print Post  
Here is my problem du jour: Let's say I have 2 resources in my Schedule and I have created a  Style object to associate with each one. When I create a Schedule item for Resource 1, I can set its Style to the one I created for it. Likewise, for an item created for Resource 2.

Now let's say I create another item and Add BOTH Resources to it. When I view the item in the calendar (in TimeTable view) for both resources can it display both styles, or is it limited to a single style only? As far as I can tell, an item can only display a single style.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Different Styles for Same Appt Possible?
Reply #1 - Mar 17th, 2008 at 8:05am
Print Post  
Items can only have one style associated with them at a time. This style can be associated with the item through its Item.Style property. All properties from that style, which are not explicitly specified, will be retrieved from the Calendar.ItemSettings.Style object and if they are not specified there as well, they will be obtained from the current theme.

How exactly would you want 2 styles to affect the same item?

Meppy
  
Back to top
 
IP Logged
 
BudMan
YaBB Newbies
*
Offline


Credidi me felem vidisse

Posts: 45
Joined: Jul 14th, 2007
Re: Different Styles for Same Appt Possible?
Reply #2 - Mar 17th, 2008 at 2:17pm
Print Post  
I have a calendar showing appointments in TimeTable view, grouped by Resource. I have 2 resources, call them Fred and Barney. I create a particular Style for each resource so, for example, Fred's appointments are red and Barney's are blue. This makes the calendar appear as alternating columns of red and blue appointments.

This is fine for most appointments. However, I have a problem if I create a single appointment with BOTH Fred and Barney included in its Resources collection. The calendar correctly displays the appointment under both resources, but it can only display the Style associated with one of them. It would be nice to apply different sytles for each resource. But I understand this would mean moving the Style property out of the Item class and into the Resource class—unless you could allow both options.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Different Styles for Same Appt Possible?
Reply #3 - Mar 17th, 2008 at 3:43pm
Print Post  
Why don't you assign a third style for mixed appointments, which is a blend between the colors of each resource the appointment is associated with? For example in your case you could assign a purple style with appointments belonging to both Fred and Barney.

Meppy
  
Back to top
 
IP Logged
 
BudMan
YaBB Newbies
*
Offline


Credidi me felem vidisse

Posts: 45
Joined: Jul 14th, 2007
Re: Different Styles for Same Appt Possible?
Reply #4 - Mar 17th, 2008 at 8:46pm
Print Post  
If I just had two resources to worry about—and their styles never changed—that would work. But I could have scores of resources, each with its own FillColor, Brush Type, etc., and these can be modified by the user. In this case, it would be impractical to programmatically assign a 'blended' style to indicate which resources are scheduled for a particular item.

Instead, I decided to just create a dedicated style to identify multiple resource appointments. You can't tell what resources it includes, but at least you can see it is a multiple resource item. Double-clicking the item will reveal a list of the Resources assigned to it.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Different Styles for Same Appt Possible?
Reply #5 - Mar 18th, 2008 at 7:04am
Print Post  
You can also use additional custom drawing in order to indicate what resources an item belongs to. For example you can render a small rectangles in one of the item sides with the color of the resource for each resource the item belongs to.

Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint