无论label的大小如何,如何让背景图始终占满label
什么属性来着的?

解决方案 »

  1.   

    这是什么?
    就是背景图平铺的效果,好像pictruebox有个sizemode属性,但是label怎么弄啊
    不会要我自己画上去吧
      

  2.   

    1画到一个临时图上,临时图与LABEL同等大小
    2设置LABEL背景为该临时图
      

  3.   


        Bitmap BP = new Bitmap(Label1.Width, Label1.Height); 
        Bitmap sBP = new Bitmap("c:\\123.jpg"); 
        using (Graphics G = Graphics.FromImage(BP)) { 
            G.DrawImage(sBP, new Rectangle(0, 0, Label1.Width, Label1.Height), new Rectangle(0, 0, sBP.Width, sBP.Height), GraphicsUnit.Pixel); 
        } 
        Label1.BackgroundImage = BP; 
      

  4.   

    我想知道labei为什么值为空背景图片不显示