반응형


private void tableLayoutPanel1_MouseMove(object sender, MouseEventArgs e)
{
// 지정영역(셀) redraw
tableLayoutPanel1.Invalidate();
}
private void tableLayoutPanel1_CellPaint(object sender, TableLayoutCellPaintEventArgs e)
{
Point pt = tableLayoutPanel1.PointToClient(Cursor.Position);
using (SolidBrush brush = new SolidBrush(e.CellBounds.Contains(pt) ? Color.Red : tableLayoutPanel1.BackColor))
e.Graphics.FillRectangle(brush, e.CellBounds);
}
https://www.codenong.com/35404110/
关于c#:鼠标在我的tablelayoutpanel的单元格上移动 | 码农家园
Mouse Move on a cell of my tablelayoutpanel 我的TLP有问题。 我希望当鼠标移到单元格上方时更改单元格的颜色。 我尝试了不同的事情,但没有任何效果。 您是否知道如何解决这个问题? TLP并不是很好用
www.codenong.com
'Windows' 카테고리의 다른 글
Color Property (0) | 2021.04.03 |
---|---|
C# 쓰레드를 위한 ConcurrentDictionary (0) | 2021.03.21 |
C# 특정일 기준으로 요일(7일) 나열방법 (0) | 2020.11.04 |
C# 투명 폼 (0) | 2020.11.04 |
C# 실행시간 측정 Stopwatch (0) | 2020.10.31 |
반응형


private void tableLayoutPanel1_MouseMove(object sender, MouseEventArgs e)
{
// 지정영역(셀) redraw
tableLayoutPanel1.Invalidate();
}
private void tableLayoutPanel1_CellPaint(object sender, TableLayoutCellPaintEventArgs e)
{
Point pt = tableLayoutPanel1.PointToClient(Cursor.Position);
using (SolidBrush brush = new SolidBrush(e.CellBounds.Contains(pt) ? Color.Red : tableLayoutPanel1.BackColor))
e.Graphics.FillRectangle(brush, e.CellBounds);
}
https://www.codenong.com/35404110/
关于c#:鼠标在我的tablelayoutpanel的单元格上移动 | 码农家园
Mouse Move on a cell of my tablelayoutpanel 我的TLP有问题。 我希望当鼠标移到单元格上方时更改单元格的颜色。 我尝试了不同的事情,但没有任何效果。 您是否知道如何解决这个问题? TLP并不是很好用
www.codenong.com
'Windows' 카테고리의 다른 글
Color Property (0) | 2021.04.03 |
---|---|
C# 쓰레드를 위한 ConcurrentDictionary (0) | 2021.03.21 |
C# 특정일 기준으로 요일(7일) 나열방법 (0) | 2020.11.04 |
C# 투명 폼 (0) | 2020.11.04 |
C# 실행시간 측정 Stopwatch (0) | 2020.10.31 |