General XMetaL Discussion
NandoC August 19, 2014 at 1:24 pm
Override opening element on click eventAugust 19, 2014 at 1:24 pmParticipants 2Replies 3Last Activity 8 years, 1 month ago
I am looking to customize the on click event on the opening element tag that makes a select all node. Is there a way around this?Derek Read August 28, 2014 at 9:45 pm
Reply to: Override opening element on click eventAugust 28, 2014 at 9:45 pm
I'm not sure which feature you are describing. Please describe your need in more detail.
Which product is this for?
Which schema are you working with?
What do you mean by “makes a select all node”?
Plus what you want it to do instead.NandoC September 10, 2014 at 2:53 pm
Reply to: Override opening element on click eventSeptember 10, 2014 at 2:53 pm
I am using Xmetal 7.0.
I have a function that selects/highlights a parent Node
This is working well, but the issue I am having is that if the node is longer that what is displayed on the screen, the editor scrolls to the end of the Node, is there a way to prevent the scrolling from happening?
Thanks.Derek Read September 10, 2014 at 6:05 pm
Reply to: Override opening element on click eventSeptember 10, 2014 at 6:05 pm
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.
- You must be logged in to reply to this topic.