Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

C# Programming

color text


Hi, if I put a string into a label, label.Text = horsy[0] + "\t" + " -
" + "\t" + returns.totReturn.ToString();, is it possible to have the
'returns.totReturn.ToString()' string part in a different colur.
Regards Robert
Hi,

No , it;s not

You have to derive from Label and do it your self. I don't think it's a very
difficult thing to do anyway

<RobcPet@yahoo.co.uk> wrote in message

news:1181149647.579251.296470@j4g2000prf.googlegroups.com...

I would create a custom control and then use the OnPaint method to paint the
text the user specifies.  Check MSDN for creation of custom .NET controls.

Rick D.
Contractor

"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.com> wrote in
message news:u35W4CGqHHA.3512@TK2MSFTNGP06.phx.gbl...

<RobcPet@yahoo.co.uk> wrote in message

news:1181149647.579251.296470@j4g2000prf.googlegroups.com...

> Hi, if I put a string into a label, label.Text = horsy[0] + "\t" + " -
> " + "\t" + returns.totReturn.ToString();, is it possible to have the
> 'returns.totReturn.ToString()' string part in a different colur.
> Regards Robert

Aside from your question (which has been answered in other replies already),
I notice you are doing:

label.Text = horsy[0] + "\t" + " - " + "\t" + ...

Why not:

label.Text = horsy[0] + "\t - \t" + ...

Mythran

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc