10-08-2013 11:40 AM - edited 10-08-2013 11:53 AM
I need to draw a focus rectangle inside of the plot area of an Intensity graph. Can I uses the CanShowFocus property, is there a C# example?
10-09-2013 10:51 AM
bill_donahue,
The CanShowFocus property just shows a box around the whole Intensity Graph. That is, when you click on the graph when the program is running, a dotted line shows up around the whole graph to indicate that it is the object that is currently selected.
When you say that you need a focus rectangle inside the plot area, what do you mean? Do you just want to draw a rectangle on part of the graph?
You might be looking for something like an intensity range annotation, which you can add by right-clicking in the graph area and selecting Edit Annotations. You can also add annotations programmatically. This is an old example, but the C# should be the same:
http://zone.ni.com/devzone/cda/epd/p/id/5046
Kelsey Johnson
Applications Engineer
National Instruments
10-09-2013 12:39 PM
Kelsey,
I don't really need annotations, what I need is a way to select a region of plots on a graph with a rectangle select tool,
similar to the zoom tool. I would like to draw a rectangle around an area, like the Shift + Left Mouse Click drag,
an have the rectangle remain on the screen until the operator either makes a new rectangle or right clicks the mouse.
I have some software written now that draws a rectangle and then uses
intensityPlot1.InverseMapDataPoint(intensityGraph1.PlotAreaBounds, p, out xValue, out yValue); to get the plots.
The problem is that the rectangle does not stay displayed on the graph.
Thanks,
Bill
10-10-2013 09:54 AM
Kelsey,
I have a C# example that I can email you that describes the issue that I am having with drawing a rectangle over the Intensity Graph plot area.
How do I upload my solution file?
Thanks,
Bill
10-10-2013 12:59 PM
Hey Bill,
You can add attachments when you reply to a forum post.
I can find plenty of examples for how to do something similar to what you’re describing in LabVIEW, but I’ve never tried to do it in Visual Studio. I’d be happy to take a look and see what I can figure out.
Kelsey
10-10-2013 01:40 PM - edited 10-10-2013 01:50 PM
I have a panel on top and an intensity graph on the bottom of my form. If you right click on the panel or the graph, and drag and drop, a red rectangle is drawn.
The intensity graph event code calls the same exact code as the panel event code. If you draw a rectangle on the intensity graph and then left click on the graph it
messes up the next time you right click and draw a rectangle on the graph.
I need the graph code to function the same as the panel when one or more rectangles are drawn. I have been working on this issue for several weeks now.
Thanks,
Bill
10-24-2013 12:28 PM
Hi,
Its been two weeks since I posted my C# project file. Can you help me with my questions, or reroute this request to someone that can?
Thanks I would really appreciate it.
Bill.
01-22-2014 06:08 AM
Hi,
Its been about 3 months since my last post and I still need to resolve this issue. I need to be able to put 1 to n number of region boxes (rubber-band) over the plots of an Intensity Graph. I believe my company pays NI for support but I am not sure the best way to get it, is it in this forum? I really need to resolve this issue soon.
Thanks
Bill D.
01-23-2014 09:00 AM
bil_donahue,
I spoke with Edna, who is currently assisting you with this issue, and she, along with other engineers, will be happy to help from the NI Support side.
01-28-2014 07:29 AM
See attached example of using an Annotation box to mimic a region box.
Bill D.