mouseDragged on List Component

Hi guys,

What I am trying to do is, I have a Tag-tree Browser and List Component side by side. When I select a tags in the tag-tree browser and drags them on to list component, it should show tagPaths of those selected tags in List Component upon dropping them.

I tried using mouseDragged event handler of list component, but it only works if mouse pressed inside list component and then drag it. However it does not count when I press mouse button outside the list component and then drop onto it.

Please suggest.

Ignition Version: 8.1
System: Windows 10

The List Component is does not expose an onTagsDropped event handler. This is probably possible to script but is far from trivial.

What is intended to happen once the tag path is in the list component?

To detect the mouse entering a component, you would use the mouseEntered event handler.

Yes earlier I tried that using mouseEntered also. What happens with is is if I select a tag in browser tree and instead of entering into List component I choose not to. Later if I enter into list component area, it adds the last selected tagPath.

The intension is, all the paths collected in list component are saving inside local DB and then some tag historical, history interval , start date, end date comes into picture.

Are you saying that you want to use the table to select tags and then modify the tag’s properties to be historical or not?

No. while selecting tags I will be selecting tags which has historical configured already.

What are you doing with the data? Is this for charting or some other use?

The easy chart will accept dropped tag paths from the tag tree.

Yeah the charting and some other stuff is there too.

Thing is earlier client were using same layout (tree browser + list component) and upon clicking on tag in Tag Tree, the tagPath would show on right side. So now they want to keep the layout similar but just update it.

Hence after update tagPath should appear in list component after dropping selected tag onto it and not just by selecting tag in tag tree browser.

There is a fairly significant difference between this and drag and drop. Especially considering that it isn’t natively exposed. To properly implement this would require a significant amount of non-trivial java coding.

I can understand not wanting to add a tag to the chart when you click on it. I can also understand how the original programmer arrived at that solution.

I would suggest implementing a popup menu.

For instance I have implemented a popup menu for our ad-hoc charting and give the operators the option of “Loading a Tag” into the chart, or refreshing the tag tree in case tags have been added.

In this way the act of selecting a tag doesn’t add it to the chart, instead the operator has to take deliberate action.

Okay, so I dug into this and it actually turned out a bit simpler than I thought.