如何使用选项卡将这些图像居中?目前我只是添加图像并将文本属性留空。
问问题
151 次
1 回答
2
Out-of-the-box it can't be done. You can try creating a custom control derived from TabControl which does something like this:
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);
}
}
于 2013-07-10T06:20:27.127 回答