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. HTML formatted label in winforms? [modified]

HTML formatted label in winforms? [modified]

Scheduled Pinned Locked Moved C#
csharphtmlwinformshelpquestion
5 Posts 3 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.
  • T Offline
    T Offline
    TheCardinal
    wrote on last edited by
    #1

    is there a label control that can support bold or different color on the same line. by using tags like in HTML? sample: This is a test for bold and this for color i want to implement this without using richtextbox can anyone please help :) -- modified at 5:34 Friday 11th August, 2006

    A S 2 Replies Last reply
    0
    • T TheCardinal

      is there a label control that can support bold or different color on the same line. by using tags like in HTML? sample: This is a test for bold and this for color i want to implement this without using richtextbox can anyone please help :) -- modified at 5:34 Friday 11th August, 2006

      A Offline
      A Offline
      Andy Moore
      wrote on last edited by
      #2

      As far as I know there is not such a control. You could, however, write this yourself fairly easily. One approach is to derive a class from Control. Your Text property would contain the text with any meta tags that you would define. In your OnPaint method you would render your text with colors, fonts, etc. based on any meta tags you may have. I hope this helps. -- modified at 22:48 Thursday 10th August, 2006 -- modified at 22:48 Thursday 10th August, 2006

      Deus caritas est

      T 1 Reply Last reply
      0
      • A Andy Moore

        As far as I know there is not such a control. You could, however, write this yourself fairly easily. One approach is to derive a class from Control. Your Text property would contain the text with any meta tags that you would define. In your OnPaint method you would render your text with colors, fonts, etc. based on any meta tags you may have. I hope this helps. -- modified at 22:48 Thursday 10th August, 2006 -- modified at 22:48 Thursday 10th August, 2006

        Deus caritas est

        T Offline
        T Offline
        TheCardinal
        wrote on last edited by
        #3

        thanks for replying Andy :) as i am new to c# i dont have the idea how to do it or where to start:) can you please point me to an article how to check for the tags and implement the rendering of text using the OnPaint method.

        A 1 Reply Last reply
        0
        • T TheCardinal

          thanks for replying Andy :) as i am new to c# i dont have the idea how to do it or where to start:) can you please point me to an article how to check for the tags and implement the rendering of text using the OnPaint method.

          A Offline
          A Offline
          Andy Moore
          wrote on last edited by
          #4

          There are copious articles at CodeProject and on the web that explain how to draw custom controls in C#. Look at the Graphics class for drawing on a control's surface.

          Deus caritas est

          1 Reply Last reply
          0
          • T TheCardinal

            is there a label control that can support bold or different color on the same line. by using tags like in HTML? sample: This is a test for bold and this for color i want to implement this without using richtextbox can anyone please help :) -- modified at 5:34 Friday 11th August, 2006

            S Offline
            S Offline
            Suelinda_W
            wrote on last edited by
            #5

            Hi, We will have an HTML label and HTML tooltip control available for .NET 2.0, beginning with the T3 2006 release of our controls. For more information on ComponentOne controls, please visit http://www.componentone.com/products.aspx?ItemType=1&TabTypeID=1&PanelIndex=1&TabMapID=8&Itemid=66&Tabid=2&SubCategoryTypeID=0[^].

            Suelinda W Customer Engagement, ComponentOne LLC

            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