0

I know that you can set the Parent of the control and the backgroundColor transparent. But this isn´t helping since I want the labels background to be transparent to the siblings in its parent control. There are multible buttons at the position where the label is that should be visible through the transparent label of my label. But I can´t set multible parents...

How would I do that? Thanks for every answer!

Joh
  • 166
  • 1
  • 1
  • 11
  • Your question is rather sparse on details, but it sounds like your problem is that setting the Label control's BackColor to Transparent allows the form's background to show through, but not its sibling controls. If that's the case, then you should be able to solve the problem by reparenting the Label control. See here: http://stackoverflow.com/questions/9387267/transparent-control-over-picturebox – Cody Gray - on strike May 30 '16 at 11:36
  • @CodyGray I have exactly the situation you described. Problem now is that I have multible buttons which are at the position where my label is and not just one. Thats why I wrote that I know about the parent thing. But since you can´t set multible parents this isn´t helping. – Joh May 30 '16 at 12:45
  • 1
    What you're trying to do is not really possible. Transparency in WinForms is basically a hack that involves the "transparent" control asking its parent to draw its background first, and then drawing on top of that. You could write custom controls that support this, but it won't be trivial. I recommend redesigning the app so that you don't need to plaster a label on top of buttons. Anyway, seeing your edit, I have reopened the question. – Cody Gray - on strike May 30 '16 at 13:19
  • The edit history for this post is quite unconventional. – MicroVirus May 30 '16 at 13:22
  • @CodyGray ok thaks. I will do that. – Joh May 30 '16 at 13:22

0 Answers0