09-21-2010 01:02 PM
I notice that when I move the mouse over the plot name portion of the plot legend, the mouse icon changes. If I left-click in this portion, the entire plot name region is highlighted. What event(s) and/or properties do I use to capture this behavior. I would like to know the size and/or location of the plot name region highlighted. I'm using LV 2010. I know about the Legend.Size and Legend.Position properties.
09-22-2010 05:47 PM
Faustina:
I'm not sure what you mean by "the entire plot name region is highlighted." Perhaps you could send a screen shot?
In LV 2010 on my machine, the legend item does not change, it just launches the menu of plot properties. I'm probably missing something, so if you could describe the behavior you're looking for, it'd help me out
The properties on that menu are all accessible via a property node for the graph/chart. They are not under the "Legend" properties, as they are properties for the plots themselves.
09-23-2010 06:31 PM - edited 09-24-2010 11:10 AM
see enclosed file
09-24-2010 02:27 PM
I don't think the file attached to that last message. Is there a chance you could re-send it?
Thanks!
09-28-2010 02:15 PM
we'll try it again
09-29-2010 09:59 AM
Faustina:
Thanks, got it this time. The highlighting happens when the text field (plot name) becomes editable. The equivalent property node is the "name" entry from the plot menu.
You'll want to set the active plot, then set properties from the "Plot" menu, as in the following example.
When run, this code yields the following on the front panel. We've set two individual plot names using property nodes.
09-29-2010 06:23 PM
the issue is this ... when the user clicks in the plot name region, I want to set that plot to the active plot and I want to change the name to a value I get from another control. so what is the event that is generated when the user clicks on on the plot name of the plot legend.
10-04-2010 10:16 AM
Faustina:
Unfortunately, there isn't an event we can latch onto when the plot within the legend is clicked on. As a workaround, we can add a radio button control beside the legend to select various plots. The radio button indices match up to the plot indices, so we can still select the active plot and rename it.
I've attached a small example that allows the user to select a plot, and rename it from a menu of presets. You'll probably want to adapt it to run in a state machine or event structure, but the logic for changing plot names is there.