We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Color of ILookUpObject not as set

Thread ID:





69143 Oct 16,2007 03:32 PM UTC Oct 17,2007 03:05 PM UTC WinForms 1
Tags: ScheduleControl
Samy Abou-Shama
Asked On October 16, 2007 03:32 PM UTC


I have my own little ILookUpObjectList (see below).
The colors I set there are plain colors, green, orange, red etc...
On the display however the colors are changed to more lighter colors. That's not the problem, as the colors are nice.
BUT: now I tried to add a legend, that tells what color is linked to what schedule status. But since I colors displayed are not the ones set I can't show exactly the color in my legend!

Can you tell me the exact colors that come out when I use my ILookUpObjectList?

(I use the same lookup list as Markers and Labels)

Thank you very much.

Samy Abou-Shama


internal class MyLookUpList : ILookUpObjectList
private Dictionary list;

public MyLookUpList()
list = new Dictionary();
list.Add(0, new ListObject(0, "Planned", Color.Orange));
list.Add(1, new ListObject(1, "Scheduled", Color.Green));
list.Add(2, new ListObject(2, "Deffered", Color.LightGreen));
list.Add(3, new ListObject(3, "Completed", Color.Blue));
list.Add(4, new ListObject(4, "Cancelled", Color.Black));

public ILookUpObject this[int i]
ILookUpObject result = null;
if (list.ContainsKey( i ))
result = list[i];
return result;
set { throw new NotImplementedException(); }

Administrator [Syncfusion]
Replied On October 17, 2007 03:05 PM UTC

The ScheduleControl uses alphablending to lighten the colors that are specified in the Labels. For example, here is the code that retrieves the label color and transforms it to the color the schedule uses by setting the alpha property to 100.

Color c = Color.FromArgb(100, ((ListObject)this.dataProvider.GetLabels()[item.LabelValue]).ColorMember);

So, you could use similar code to get the same color as the ScheduleControl uses.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon