user-interfacewxwidgetswxhaskell

With wxWidgets, is there a straightforward way to draw lines between items in two lists?


Specifically in wxHaskell, but in general, would like to be able to draw lines between items in two lists that are side by side to show that there is a relationship between the items. Something like the mockup below.

two list boxes with arrows between items


Solution

  • Perhaps there is something about your setup that I do not understand, but this seems perfectly straightforward.

    Suppose you want to draw a line between input one and output three.

    I notice that you have shown the arrows on TOP of the list windows. The above will draw them behind. To draw them in the top, you will have to do a little bit of computational geometry, then you can calculate the points where the line (xi,yi,xo,yo) intersects the edges of the two list boxes. Then you draw three lines, using the same brush,