0

我需要修改我在网上找到的这个tabcontrol,如果我改变项目高度,triable 不能正确调整

在此处输入图像描述

绘图的代码是

G.SmoothingMode = SmoothingMode.HighQuality
                Dim p() As Point = {New Point(ItemSize.Height - 3, GetTabRect(i).Location.Y + 20), _
                           New Point(ItemSize.Height + 4, GetTabRect(i).Location.Y + 14), _
                           New Point(ItemSize.Height + 4, GetTabRect(i).Location.Y + 28)}
     G.FillPolygon(Brushes.White, p)
     G.DrawPolygon(New Pen(Color.FromArgb(170, 187, 204)), p)

我已经对线路进行了调整,但New Point(ItemSize.Height + 4, GetTabRect(i).Location.Y + 14)没有成功。

如果调整大小,我需要三角形,尽管它更大并且在 Tabpage 矩形中居中,比如 3 点。

有任何想法吗

4

1 回答 1

1

经过进一步修补后,我能够找到解决方案

 Dim hlf As Integer = GetTabRect(i).Height \ 2
G.SmoothingMode = SmoothingMode.HighQuality
            Dim p() As Point = {New Point(ItemSize.Height - 6, GetTabRect(i).Location.Y + hlf), _
      New Point(ItemSize.Height + 4, GetTabRect(i).Location.Y + hlf - 7), _
      New Point(ItemSize.Height + 4, GetTabRect(i).Location.Y + hlf + 7)}
于 2018-09-13T10:44:43.003 回答