We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback
Platform : WinForms
Category : Controls

I’m trying to make the background of my linklabel transparent so a picturebox will show through it. However, if I set the link label’s BackColor property to Transparent the label still has a white background. Why

Controls with a "Transparent" color actually render their parent’s background, so you’re seeing the White background of the Form, not the PictureBox. Three easy ways to deal with this:
  • Use a Panel with it’s "BackgroundImage" property set instead of a PictureBox, and parent the LinkLabels to the panel (PictureBoxes generally don’t have children)
  • Set the BackgroundImage of the Form to the image (basically the same as 1 above, but avoids the extra control)
  • In code, set the Parent of the LinkLabel to be the PictureBox. You’ll need to update the LinkLabel’s position to match the new origin of the parent if the PictureBox isn’t at (0,0)
(Shawn Burke on microsoft.public.dotnet.framework.windowsforms newsgroup)

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon