Pages: 1
Print
Author Topic: Deal with the onclick event when using displaying SVG image  (Read 274 times)
bk
Member

Posts: 5


« on: February 21, 2018, 06:31:48 AM »

On XMetal Author Entreprise 12, when rendering SVG image in XMetal using the Shell.Explorer.2 ActiveX, we are unable to catch the "onClick" event (we want to do it to launch the SVG authoring program).

My understanding is that the ActiveX doesn't forward the click event to Xmetal.

Are there any ideas to catch this events ? (setting something in the activeX for instance)
Are there any other way to display SVG image in Xmetal ?

Thanks in advance for your answers.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2564



WWW
« Reply #1 on: February 21, 2018, 02:16:28 PM »

It would be the IE WebBrowser control (Shell.Explorer) that is not passing the message through in this case.

I don't know how easy it would be to do this, but I think you would need to handle the click in an HTML page. That likely means opening an HTML page in IE (instead of opening the SVG in IE) then passing the file path for the SVG from XMetaL to the web page (instead of passing it to IE), and then having the HTML file load the SVG file (likely through script so that the path can be varied). Now that an HTML page is loaded you may have the ability to process an OnClick event in there, but that depends on how the SVG is being displayed by IE (natively or via another control) and whether it exposes the OnClick event when you click on an SVG image.

There is no native support for rendering SVG in XMetaL Author, which is why the IE WebBrowser control (Shell.Explorer) is usually used. There are other ActiveX controls that render SVG but I believe any that are currently supported (by their maker) are commercial.

Adobe used to make an ActiveX control and was providing it for free for use with Internet Explorer, but it was specifically designed for use with IE so it had some quirks that made it unusable in other software. They stopped supporting it long ago.
Logged
Pages: 1
Print
Jump to: