如何使用标签将这些图像居中?目前,我只是添加图像并将text属性留空。

最佳答案

开箱即用无法完成。您可以尝试创建一个从TabControl派生的自定义控件,该控件的功能如下:

public class BrunoTabControl : TabControl
{
    protected override void OnDrawItem(System.Windows.Forms.DrawItemEventArgs e)
    {
        if (ImageList == null) return;
        int imageIndex = TabPages[e.Index].ImageIndex;
        if (imageIndex >= 0) ImageList.Draw(e.Graphics, 0, 0, imageIndex);
    }
}

09-04 00:33