FlexGrid for WinForms

how to erase the lines on cols[0] & rows[0] after scroll

  •  26334980 said 11 months, 4 weeks ago:

    After scroll, the lines still repaint on cols[0] & rows[0]
    how to invalidate repaint in these areas?

    Help me modify the code

    Thanks
    Kerry

    Attachments:
    You must be logged in to view attched files.
  •  Wolfgang Knauf7p said 11 months, 3 weeks ago:

    Hi,

    before drawing the line, check that the coordinates are not in the fixed area.

    For not drawing in the fixed row, this check is needed:

                    if (y1 > _flex.Rows[0].HeightDisplay)
                    {
                      formGraphics.DrawLine(myPen, x1, y1, x2, y2); //col1,row1,col2,row2  
                    }
    

    Same must be done for the fixed col.

    Probably you will need more work if you want to clip the line instead of not drawing it at all. This task is up to you ;-)

    Best regards

    Wolfgang

    Answer
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.