我有一个 WinForms TabControl设置为
Multiline = True
我制作了自己的自定义 RowsChanged 事件
''' <summary>
''' Event that is raised if the rowCount of the control changed.
''' </summary>
Public Event RowsChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Private Sub Me_SizeChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.SizeChanged, Me.SelectedIndexChanged, Me.ControlAdded, Me.ControlRemoved
If rows <> Me.RowCount Then
rows = Me.RowCount
RaiseEvent RowsChanged(sender, e)
End If
End Sub
现在我可以注册那个活动了。我想知道一排的高度,所以我可以做一些尺寸计算。有什么办法可以确定吗?到目前为止,我只计算了像素,这不是很好。