Results 1 to 3 of 3

Thread: Drawing Arrows between Datagridview Cells

  1. #1

    Thread Starter
    Addicted Member Genom's Avatar
    Join Date
    May 2006
    Posts
    186

    Question Drawing Arrows between Datagridview Cells

    Hi Guys,


    I am stuck with a problem here. I am trying to draw arrows between the cells on datagridview. The problem is, if I make graphics with:
    VB.Net Code:
    1. Dim g As Graphics = dgwTable.CreateGraphics

    Then draw something with this graphics, my lines stay behind the cells. Is there any way to draw onto the cells?

    Is there any way to draw arrows?

    Thanks a lot...
    Dim Me As Coder

  2. #2
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Drawing Arrows between Datagridview Cells

    The problem is that the cells are drawn over the surface of your datagridview. This means that your arrow is drawn first and the cells are drawn over it. The only workaround that I see is to draw on some 'transparent' surface that you place over the datagridview or you can draw your arrow in the cells. Of course it will involve some very sophisticated algorithm of determining which cells are going to be affected and then draw a portion of your arrow in every cell so that it appears a whole line.

  3. #3

    Thread Starter
    Addicted Member Genom's Avatar
    Join Date
    May 2006
    Posts
    186

    Re: Drawing Arrows between Datagridview Cells

    Quote Originally Posted by cicatrix View Post
    The problem is that the cells are drawn over the surface of your datagridview. This means that your arrow is drawn first and the cells are drawn over it. The only workaround that I see is to draw on some 'transparent' surface that you place over the datagridview or you can draw your arrow in the cells. Of course it will involve some very sophisticated algorithm of determining which cells are going to be affected and then draw a portion of your arrow in every cell so that it appears a whole line.
    thanks a lot... I think I have to write my own table component or put labels around as arrows...
    Dim Me As Coder

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width