Click here to Skip to main content
15,890,506 members
Home / Discussions / C#
   

C#

 
GeneralRe: UDP Send function sends duplicate data Pin
led mike11-Feb-08 11:16
led mike11-Feb-08 11:16 
GeneralRe: UDP Send function sends duplicate data Pin
Chase Davis11-Feb-08 12:30
Chase Davis11-Feb-08 12:30 
GeneralRe: UDP Send function sends duplicate data Pin
led mike12-Feb-08 9:30
led mike12-Feb-08 9:30 
Generalan application for showing shared files using c# and .net Pin
addemy11-Feb-08 7:24
addemy11-Feb-08 7:24 
GeneralRe: an application for showing shared files using c# and .net Pin
led mike11-Feb-08 7:51
led mike11-Feb-08 7:51 
GeneralRe: an application for showing shared files using c# and .net Pin
addemy11-Feb-08 7:59
addemy11-Feb-08 7:59 
GeneralRe: an application for showing shared files using c# and .net [modified] Pin
led mike11-Feb-08 8:13
led mike11-Feb-08 8:13 
Generalsystem.drawing.color [modified] Pin
s3rro11-Feb-08 7:11
s3rro11-Feb-08 7:11 
Hi,

I am just testing some functions.
My question is how can I change the color of a LABEL, TAB texts on a form.

What I tried?
I created an xml file with the forecolor, backcolor info.


<color> <settings>
<label1>
<forecolor>> #FFFFFF
<backcolor> #FFFFFF




then I tried to link it.

this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(46, 13);
this.label1.TabIndex = 0;
// this.label1.Text = "Test123";
this.label1.Text = xDoc.SelectSingleNode("Language/Settings/Label1/Text").InnerText.Trim();
this.label1.ForeColor = xDoc1.SelectSingleNode("Color/Settings/Label1/ForeColor").InnerText.Trim();
this.label1.BackColor = xDoc1.SelectSingleNode("Color/Settings/Label1/BackColor").InnerText.Trim();

and under my main class i have:
public Form1()
{
InitializeComponent();

//Load XML
xDoc1 = new XmlDocument();
xDoc1.Load(Application.StartupPath + @"\Application Data\DummyText.xml");
}


but its doesnt work like this, Summary : I want to change the color of the TEXTs on my form from an xml document. i know i need to use system.drawing.color somewhere.

modified on Monday, February 11, 2008 1:18 PM

GeneralRe: system.drawing.color Pin
led mike11-Feb-08 8:07
led mike11-Feb-08 8:07 
GeneralRe: system.drawing.color Pin
Insincere Dave11-Feb-08 8:34
Insincere Dave11-Feb-08 8:34 
GeneralRe: system.drawing.color Pin
led mike11-Feb-08 8:38
led mike11-Feb-08 8:38 
GeneralRe: system.drawing.color Pin
s3rro11-Feb-08 8:53
s3rro11-Feb-08 8:53 
GeneralRe: system.drawing.color Pin
Pete O'Hanlon11-Feb-08 10:16
mvePete O'Hanlon11-Feb-08 10:16 
QuestionRequest is not available in this context Pin
Ryno Burger11-Feb-08 6:18
Ryno Burger11-Feb-08 6:18 
GeneralRe: Request is not available in this context Pin
led mike11-Feb-08 6:22
led mike11-Feb-08 6:22 
GeneralRe: Request is not available in this context Pin
Ryno Burger11-Feb-08 6:27
Ryno Burger11-Feb-08 6:27 
GeneralRe: Request is not available in this context Pin
led mike11-Feb-08 6:47
led mike11-Feb-08 6:47 
GeneralRe: Request is not available in this context Pin
Not Active11-Feb-08 6:24
mentorNot Active11-Feb-08 6:24 
GeneralRe: Request is not available in this context Pin
Steve Westbrook11-Feb-08 6:38
Steve Westbrook11-Feb-08 6:38 
GeneralRe: Request is not available in this context Pin
leppie11-Feb-08 8:03
leppie11-Feb-08 8:03 
GeneralRe: Request is not available in this context Pin
led mike11-Feb-08 8:12
led mike11-Feb-08 8:12 
GeneralRe: Request is not available in this context Pin
Steve Westbrook11-Feb-08 13:52
Steve Westbrook11-Feb-08 13:52 
GeneralRe: Request is not available in this context Pin
led mike12-Feb-08 5:25
led mike12-Feb-08 5:25 
GeneralRe: Request is not available in this context Pin
Steve Westbrook12-Feb-08 6:14
Steve Westbrook12-Feb-08 6:14 
GeneralRe: Request is not available in this context Pin
led mike12-Feb-08 7:47
led mike12-Feb-08 7:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.