I was looking for a method to limit the maximum length of a cursor name (because this length is limited in a report). I have a piece of code to check the length of the cursor name and limit it so that is solved. However now I need a way to trigger this code to check the cursor name. So if the user has entered the name of the cursor this check has to be done. I can't find any method that captures this kind of event. Any ideas?
There doesn't seem to be an event that fires on cursor name change.
A workaround would be to periodically read and compare the array values of XY Graph's "Cursor List" property. This check can be done in the timeout of your event loop or in another asynchronously running while loop. On a detection of a name change of any of the cursors, you could fire a dynamic event or send queue messages to execute your code that enforces the cursor name's length.
I choose an other option, I've created an string control and put it over the cursor name in the cursor legend. Now I link both to eachother and on trigger on this string control.