Am Freitag, den 18.05.2007, 17:21 +0200 schrieb Cor Nouws:
> Hi *,
>
> I'm facing a rough 60 controls, that need to have actions linked to events.
> So thats about 60 * 2 * 9 = 1080 mouse clicks.
> (And I love my key board so much :-) )
>
> Any change to use a macro to assign macro's to the events?
> Not at run time, but just when designing?
sub connectControlEventToMacro( _
aControl as object, _
aEventName as String, _
aMacroName as String _
)
Dim oEvents(0) as New com.sun.star.script.ScriptEventDescriptor
oEvents(0).ListenerType = "XActionListener"
oEvents(0).EventMethod = aEventName '"actionPerformed"
oEvents(0).AddListenerParam = ""
oEvents(0).ScriptType = "StarBasic"
oEvents(0).ScriptCode = aMacroName '"application:Standard.Forms.Test"
"document:Standard.Forms.Test"
aControl.registerScriptEvent(0, oEvents(0))
end sub
if something isn't clear look out for older email on this list or on one
of the dbalists, Frnk Schönheit helped IIRC.
Have fun,
Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]