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. Transparent label problem

Transparent label problem

Scheduled Pinned Locked Moved C#
helpquestion
4 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.
  • T Offline
    T Offline
    TimSWatson
    wrote on last edited by
    #1

    Hi Im having a problem making the background of a label transparent. I have a label on top of a picturebox and I make the labels parent the picturebox. I also set the labels backcolor to transparent. For some reason the label just disapears when I do this. Does anyone have any ideas? Thanx

    A D J 3 Replies Last reply
    0
    • T TimSWatson

      Hi Im having a problem making the background of a label transparent. I have a label on top of a picturebox and I make the labels parent the picturebox. I also set the labels backcolor to transparent. For some reason the label just disapears when I do this. Does anyone have any ideas? Thanx

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      Try by setting the textbox's parent to the picture box and also by bringing the label to the front. Something like

      Label1.Parent = PictureBox1;
      Label1.BringToFront();

      .

      1 Reply Last reply
      0
      • T TimSWatson

        Hi Im having a problem making the background of a label transparent. I have a label on top of a picturebox and I make the labels parent the picturebox. I also set the labels backcolor to transparent. For some reason the label just disapears when I do this. Does anyone have any ideas? Thanx

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Setting the background to Color.Transparent tells the label control to inherit the background properties of it's parent container. It does NOT make the background transparent. In order to do what you want, you'd have to create your own label control and render it yourself. Your not the first person to want to do this. There are a ton of examples of doing a true TransparentLabel ono the web. All it takes is a little Google to find them. ".net transparent label[^]"

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        1 Reply Last reply
        0
        • T TimSWatson

          Hi Im having a problem making the background of a label transparent. I have a label on top of a picturebox and I make the labels parent the picturebox. I also set the labels backcolor to transparent. For some reason the label just disapears when I do this. Does anyone have any ideas? Thanx

          J Offline
          J Offline
          Johnny J
          wrote on last edited by
          #4

          This article's code contains a transparent label control that I have found useful on numerous occasions: SimpleLine line and box graphics controls[^]

          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