Home Forums General XMetaL Discussion Override opening element on click event Reply To: Override opening element on click event

Derek Read

Reply to: Override opening element on click event

Given your code it looks like this is XMAX?
When I asked about which product I was hoping for one of these:
XMetaL Author Enterprise
XMetaL Author Essential

The code you have quoted here will likely run the same in all three products.
I suspect your issue with scrolling can be resolved by using Range instead of Selection. The former generally does not move the selection, the latter does. In a few cases using Range will move the selection. Some Range APIs have no option but to do that — the most obvious being Range.Select(). In those cases the solution is to store the current range in a variable, then create another one you will use to make your document changes and when all of that is complete restore the selection to the stored range. If the changes you make to the document have not messed up the original selection (deleting it for example) then you can often restore it.