2013-09-27 259 views
0

在toolstripstatuslabel中,我添加图像并显示它,如下所示。c#无法设置ToolStripStatusLabel的大小?

情况1:设置在图像列表大小[不工作]

情况2:设置标签的大小[不工作]

在上述两种情况下,大小是没有得到反射。

StatusStrip statusStrip = new StatusStrip(); 
//Set the size of the status bar 
statusStrip.AutoSize = false; 

ImageList imgList = new ImageList(); 

...Add resource images to image list 

imgList.ImageSize = new System.Drawing.Size(50, 50); 

//Set the images on the status strip 
ToolStripStatusLabel add = new ToolStripStatusLabel(); 
add.Image = jobImgList.Images[0]; 

//Set auto size to false, so specify the size 
add.AutoSize = false; 
add.Size = new System.Drawing.Size(50, 50); 

statusStrip.Items.Add(add); 

除了将AutoSize设置为false以外,是否还有其他属性需要更改?

+0

并且:http://stackoverflow.com/questions/8216308/change-the-height-of-statusstrip/9191268#9191268 –

回答