Reasons for why a WinForms label does not want to be transparent?

后端 未结 11 1805
抹茶落季
抹茶落季 2020-11-28 10:42

Why can\'t I set the BackColor of a Label to Transparent? I have done it before, but now it just don\'t want to...

I created a new UserControl, added a progressbar a

11条回答
  •  死守一世寂寞
    2020-11-28 11:04

    So as the comment to my previous answer stated, Control is the default behaviour, and is what I remembered as being Transparent.

    Anyway, have you tried setting the background property of your UserControl, or the container your label is in (Panel, Form, whatever?), your label should reflect that color :)


    Old Answer: Its been a while since I did winforms programming, but as I recall labels are transparent per default? thus its only the text that gets an actual color and the bacground color mimics whatever is behind it :)

提交回复
热议问题