Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how to make a part of string as Bold??

how to make a part of string as Bold??

Scheduled Pinned Locked Moved C#
tutorialhelpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hema Bairavan
    wrote on last edited by
    #1

    Hi peoples, I have to display a string in the label, i will concatenate and pass the same to the label, but my need here is i want to do some part of the string as bold, i.e for example the concatenate string is Website Code project and i need is that Website Code project can any one help me?? thanks in advance

    T H G 3 Replies Last reply
    0
    • H Hema Bairavan

      Hi peoples, I have to display a string in the label, i will concatenate and pass the same to the label, but my need here is i want to do some part of the string as bold, i.e for example the concatenate string is Website Code project and i need is that Website Code project can any one help me?? thanks in advance

      T Offline
      T Offline
      Tuwing Sabado
      wrote on last edited by
      #2

      for web project. Label2.Text = @"<b>Website</b> Code project"; happy coding...

      1 Reply Last reply
      0
      • H Hema Bairavan

        Hi peoples, I have to display a string in the label, i will concatenate and pass the same to the label, but my need here is i want to do some part of the string as bold, i.e for example the concatenate string is Website Code project and i need is that Website Code project can any one help me?? thanks in advance

        H Offline
        H Offline
        Hari Om Prakash Sharma
        wrote on last edited by
        #3

        it can be done via graphics.DrawString but might not work on labels. try that one. format string part using some font and display it.

        First and the Foremost: FIGHT TO WIN
        MySite:
        HariOmPrakash.InFo

        1 Reply Last reply
        0
        • H Hema Bairavan

          Hi peoples, I have to display a string in the label, i will concatenate and pass the same to the label, but my need here is i want to do some part of the string as bold, i.e for example the concatenate string is Website Code project and i need is that Website Code project can any one help me?? thanks in advance

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          The label doesn't support different font settings for part of the text. Use the Paint event of the label and draw the text yourself.

          Despite everything, the person most likely to be fooling you next is yourself.

          H 1 Reply Last reply
          0
          • G Guffa

            The label doesn't support different font settings for part of the text. Use the Paint event of the label and draw the text yourself.

            Despite everything, the person most likely to be fooling you next is yourself.

            H Offline
            H Offline
            Hema Bairavan
            wrote on last edited by
            #5

            is it possible for that to do in the text field display only??

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups