Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Sizeable and Moveable Plot Legend

I have a form that contains 4 graphs with legends on each.  Is there a way to adjust the size or location of the legends during debug. For instance, if points are plotted under or near my legend, I would like to be able to move the legend off of the graph.

TIA.

0 Kudos
Message 1 of 3
(3,619 Views)

Hi Maramckmc,

 

you can use the legend1.SetBounds method to change the position and size of your legend object:

 

myLegendObject.SetBounds(x,y,width,height)

 

where x is distance from the left bound of the legend container to the left bound of the container, and is the distance from the top bound of the legend container to the top bound of the container.  I hope this helps!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 2 of 3
(3,593 Views)

Hi Maramckmc,

 

I created an example implementing the moving and resizing functionality at runtime, which should be on the developer zone soon.  I have attached the solution here for your convenience.  Let me know if you have any other questions!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 3 of 3
(3,520 Views)