Seeing as this sounds as a fairly complex widget, I’ll assume you’re doing this in C++.
Usually when I make custom widget functionality I try to find a similar widget (either in UE or in the project), and Tools->Debug->Widget Reflector
is great for that because you can inspect basically anything slate-related you find in UE. For a good example of line drawing (and other primitives) take a look at SWorldPartitionEditorGrid2D::OnPaint
, which will lead you to FSlateDrawElement::MakeLines
(and other similar functions).
(if you’re not using C++ you would override OnPaint
in your widget graph and use DrawLine
and similar functions on the context object)