gpt4 book ai didi

c# - 通过行在 DataGridView 中绘制线条

转载 作者:太空宇宙 更新时间:2023-11-03 14:04:16 24 4
gpt4 key购买 nike

我正在尝试通过 DataGridView 中的行绘制线条。这个想法是完成甘特图。到现在为止,我已经可以绘制条形柱了。但是当一个任务之前有另一个任务时,我需要画出连接它们的线。

这是我现在所在的位置:enter image description here

我需要的是在椭圆中绘制连接器,例如“Tarea 6”和“Tarea 7”

enter image description here

最佳答案

尝试 RowPostPaint 事件,例如:

e.Graphics.FillRectangle(Brushes.Red, 20, e.RowBounds.Top + 6, 
e.RowBounds.Width, CInt(e.RowBounds.Height / 2));

关于c# - 通过行在 DataGridView 中绘制线条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9862393/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com