无法将标签的背景色设置为透明 [英] Not able to set the Backcolor of label as Transparent
问题描述
使用标签"的属性无法将背景色设置为透明...当我从将某些颜色显示为背景色的选项中选择透明颜色时,如果透明工作正常,则必须显示背景而不是某些颜色.请帮忙
Using properties of "label" not able to set the backcolor as transparent ... when i select the color transparent from the option which is showing some color as backcolor, if transparent works properly must show background instead of some colors. please help
推荐答案
如果在设计时将背景设置为透明时添加控件,它将显示"表单的背景而不是放置它的控件,除非控件是一个容器,例如面板.
If you add a control at design time when setting the background to transparent it 'displays' the background of the form not the control on which it was placed unless that control is a container such as a panel.
2 个选项:
1 将标签放在面板上,然后标签会显示面板背景(如果您想要这样做,可以是图片)
1 place the label on a panel and the label then displays the panel background (which can be a picture if that is what you are trying to do)
2 以编程方式放置标签,即
2 place the label programatically i.e.
dim Label1 As New Label
Control.Controls.Add(Label1)
Label1.BackColor = Color.Transparent
这篇关于无法将标签的背景色设置为透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!