本文整理汇总了VB.NET中System.Windows.Forms.TableLayoutCellPaintEventArgs类的典型用法代码示例。如果您正苦于以下问题:VB.NET TableLayoutCellPaintEventArgs类的具体用法?VB.NET TableLayoutCellPaintEventArgs怎么用?VB.NET TableLayoutCellPaintEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TableLayoutCellPaintEventArgs类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: DemoTableLayoutPanel
Public Class DemoTableLayoutPanel
Inherits TableLayoutPanel
Protected Overrides Sub OnCellPaint( _
ByVal e As System.Windows.Forms.TableLayoutCellPaintEventArgs)
MyBase.OnCellPaint(e)
Dim c As Control = Me.GetControlFromPosition(e.Column, e.Row)
If c IsNot Nothing Then
Dim g As Graphics = e.Graphics
g.DrawRectangle( _
Pens.Red, _
e.CellBounds.Location.X + 1, _
e.CellBounds.Location.Y + 1, _
e.CellBounds.Width - 2, _
e.CellBounds.Height - 2)
g.FillRectangle( _
Brushes.Blue, _
e.CellBounds.Location.X + 1, _
e.CellBounds.Location.Y + 1, _
e.CellBounds.Width - 2, _
e.CellBounds.Height - 2)
End If
End Sub
End Class