Change Text Color |
Post Reply |
Author | |
spbrady
Newbie Joined: 26 November 2007 Location: United States Status: Offline Points: 14 |
Post Options
Thanks(0)
Posted: 26 November 2007 at 6:08pm |
Hello,
I can't seem to change the text color of one of my items in TaskPanel. I am using VS.NET 2005 Item = Group.Items.Add(0, "TEXT 1", XTPTaskPanelItemType.xtpTaskItemTypeLink, -1); Color C = Color.Red; Item.TextColor = (uint)(C.ToArgb()); What am I missing? Any help would be greatly appreciated, I feel like I am doing something stupid. Thanks |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Think its bit-order-problem. try
Color C = Color.Green;
Item.TextColor = (uint)(C.ToArgb()); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
spbrady
Newbie Joined: 26 November 2007 Location: United States Status: Offline Points: 14 |
Post Options
Thanks(0)
|
So how would I add and item and then change the text color. I don't see a difference between yours and mine except for the color.
Thanks for your quick reply! |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
I mean don't use ToArgb use some hex value: Item.TextColor = (uint)(0xff00ff);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
spbrady
Newbie Joined: 26 November 2007 Location: United States Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Thanks Oleg, I am able to change colors, but if I use the hex value for blue, the color that shows up is not blue. Why is this Blue = 0x0000FF So I use Item.TextColor = (uint)(0x0000FF); What am I doing wrong. I am using this page to pick my colors: http://cloford.com/resources/colours/500col.htm Thanks |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
try Item.TextColor = (uint)(0xFF0000);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
spbrady
Newbie Joined: 26 November 2007 Location: United States Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Oleg I figured it out.
I wanted Blue which was 0x0000FF I thought that it was in the FORMAT R,G,B. It is actually B,G,R. So when I put 0xFF0000 I get blue! Do I normally need to put colors in this way? Thanks |
|
spbrady
Newbie Joined: 26 November 2007 Location: United States Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Thanks again for your help!
|
|
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 |