Hi, I'm trying to connect script routines to two buttons in a writer doc.
I found http://codesnippets.services.openoffice.org/Office/Office.SettingEventMethods.snip The code looks like this: oView = oDocument.CurrentController oDrawPage = oView.getActiveSheet.DrawPage ' get the first form oForm = oDrawPage.getForms.getByIndex(0) oEvents(0).ListenerType = "XActionListener" oEvents(0).EventMethod = "actionPerformed" oEvents(0).AddListenerParam = "" oEvents(0).ScriptType = "StarBasic" oEvents(0).ScriptCode = "document:Standard.Module1.Test" oForm.registerScriptEvent(0, oEvents(0)) and it works for the first button. But how can the second button be connected? The IDL reference tells me about "css.script.registerScriptEvent": ... registers one event for an object identified by its index. If any object is attached under this index, then this event is attached automatically. ... I do not understand what object is in this context. Is it the main form ("Standard") or is it the control aka. my button? TIA, Marc --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
