7 Replies - 2135 Views - Last Post: 09 August 2012 - 04:56 PM Rate Topic: -----

#1 Sabra khan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 08-August 12

Multiple text colors

Posted 08 August 2012 - 05:56 PM

I am new to c# programing and now creating asp.net c# web application, i want to display different words with different colors using a textbox. is there any way to do it ???
Is This A Good Question/Topic? 0
  • +

Replies To: Multiple text colors

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5678
  • View blog
  • Posts: 12,217
  • Joined: 02-June 10

Re: Multiple text colors

Posted 08 August 2012 - 06:11 PM

No, not in a textbox. A WinForms RichTextBox or WPF RichTextBox does support color.

Of course since you are just starting out and it is all equally new to you, I would suggest you jump straight to WPF and leave WinForms behind. Its the direction everything is being pushed and puts you more in line with Windows8 and silverlight development.



First learn the language by working 2-5 "Learn C# in 30 days" type books cover to cover. Do a couple hundred on-line tutorial projects where you build what you're told to build, the way you are told to build it WITH AN EXPLANATION OF WHY so you can learn.

Then later you can start architecting your own simple stuff. Build a calculator. Build a DVD library program. Etc. Stuff that doesn't involve the complexity of a game. Then move up to games.



There are three routes people seem to take when learning programming.
  • Just start trying to create programs
  • Start taking apart other programs and try to figure out the language by reverse engineering
  • Follow a guided learning course (school or self-teaching books)


For the life of me I can't figure out why people try 1 & 2. I strongly suggest taking the guided learning approach. Those book authors go in a certain order for a reason: They know what they're doing and they know the best order to learn the materials.

Quote

Where do I start?


You start by learning a coding language FIRST.
Learn to plan before you type.
THEN you start designing software with a purpose.


If this sounds like you

Newbie/Rookie said:

I have a little programming experience but I need to write ...
read this section
Spoiler


Otherwise, you can just jump to the resources here:
Some of the tutorials below are for C# or Java not C, C++, VB.NET [...]. But the conceptual stuff of classes, object oriented design, events etc. are not language specific and should give you enough guidance in theory of program development for you to be able to look-up specific code example in your chosen coding language.



Resources, references and suggestions for new programmers. - Updated Mar 2012
Spoiler

This post has been edited by tlhIn`toq: 08 August 2012 - 06:10 PM

Was This Post Helpful? 0
  • +
  • -

#3 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 4577
  • View blog
  • Posts: 8,019
  • Joined: 08-June 10

Re: Multiple text colors

Posted 08 August 2012 - 10:14 PM

Given that this is web forms, not win forms, I'm going to move the post. Also, TextBoxes render to <input> tags. HTML is styled with CSS, so you should look up what styles you would need to use to achieve your desired effect.
Was This Post Helpful? 0
  • +
  • -

#4 Sabra khan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 08-August 12

Re: Multiple text colors

Posted 09 August 2012 - 12:15 AM

i told that i am new to c# programing, will you give me an example for how to use these html styles ?????

sir this is my thesis project and project requirement is that it must a web application, is there any possibility to achive multi text colors in webform ????
Was This Post Helpful? 0
  • +
  • -

#5 MrShoes  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 314
  • View blog
  • Posts: 490
  • Joined: 13-June 12

Re: Multiple text colors

Posted 09 August 2012 - 12:29 AM

Quote

i am new to c# programing
+

Quote

this is my thesis project
= tough course.

Quote

is there any possibility to achive multi text colors in webform
Already answered:

Quote

TextBoxes render to <input> tags. HTML is styled with CSS, so you should look up what styles you would need to use to achieve your desired effect.

Quote

will you give me an example for how to use these html styles ?
Yes: This was the first result of a google search.
Was This Post Helpful? 1
  • +
  • -

#6 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 4577
  • View blog
  • Posts: 8,019
  • Joined: 08-June 10

Re: Multiple text colors

Posted 09 August 2012 - 08:45 AM

Why are people who don't know how to program doing thesis work? I don't get it. You had years to learn how to program, and now you're running to us on the internet expecting us to teach you how to change the color of a text box for your thesis! Did you sleep through the last three years of school?

I wouldn't be this harsh if you had been willing to do the slightest bit of research. I gave you all the keywords you need to do a google search to get tutorials. HTML, Input, style. String that together into a question and you'll get thousands of help articles. But no, you have to say "someone pls tell me how to do it!!!???". No.
Was This Post Helpful? 2
  • +
  • -

#7 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 446
  • View blog
  • Posts: 1,501
  • Joined: 28-April 09

Re: Multiple text colors

Posted 09 August 2012 - 09:46 AM

View PostSabra khan, on 09 August 2012 - 02:15 AM, said:

i told that i am new to c# programing, will you give me an example for how to use these html styles ?????

sir this is my thesis project and project requirement is that it must a web application, is there any possibility to achive multi text colors in webform ????


1. Html has nothing to do with C#
2.How the heck do you get a requirement to have a web application as part of your thesis and yet have no idea what html or css is?
3. Yes it is possible to achieve text colors in a web form
4. Put some effort into figuring it out yourself, this is YOUR thesis afterall, not ours
Was This Post Helpful? 0
  • +
  • -

#8 Sabra khan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 08-August 12

Re: Multiple text colors

Posted 09 August 2012 - 04:56 PM

View PostCurtis Rutland, on 09 August 2012 - 08:45 AM, said:

Why are people who don't know how to program doing thesis work? I don't get it. You had years to learn how to program, and now you're running to us on the internet expecting us to teach you how to change the color of a text box for your thesis! Did you sleep through the last three years of school?

I wouldn't be this harsh if you had been willing to do the slightest bit of research. I gave you all the keywords you need to do a google search to get tutorials. HTML, Input, style. String that together into a question and you'll get thousands of help articles. But no, you have to say "someone pls tell me how to do it!!!???". No.


for your kind info, i am biotechnologist not a programmer,thats none of your business that why i am doing my thesis in programing.i am just new to c# even then i hv developed a complete software with in 30 days.
the only thing remaing is that how to display different words with different colors in a single textbox???

were you sleeping while reading my post ???? bcz my question was (how to dispaly different words with different colors using a textbox in asp.net c# web application?) now if you r such a genius then answer me, if not then just get lost...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1