LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I draw a line/arrow on the UIR in CVI (Decoration?)?

Is there an easy way to do this without using a picture?  I would like to be able to draw a line/arrow and rotate it to point at specific items in the UIR.
0 Kudos
Message 1 of 3
(3,813 Views)

I think the easiest way to do this is to create a small canvas, set the background to transparant and draw your arrow using the CanvasDrawPoint function. The code below should draw you a nice arrow (make sure the canvas is large enough).

 SetCtrlAttribute (pnl, PNL_CANVAS, ATTR_PICT_BGCOLOR, VAL_TRANSPARENT);
 CanvasDrawLine (pnl, PNL_CANVAS, MakePoint (0, 8), MakePoint (30, 8));
 CanvasDrawLine (pnl, PNL_CANVAS, MakePoint (23, 1), MakePoint (30, 8));
 CanvasDrawLine (pnl, PNL_CANVAS, MakePoint (23, 15), MakePoint (30, 8));

I think it doesn't take too much time to figure out which coordinates to use to make the arrow point to another direction...

Success,

Wim

Message Edited by Wim S on 08-22-2006 02:20 PM

0 Kudos
Message 2 of 3
(3,793 Views)

I'm not sure this will meet your rotating requirements, but also check out this thread....

http://forums.ni.com/ni/board/message?board.id=180&message.id=24232#M24232

0 Kudos
Message 3 of 3
(3,780 Views)