Difference between revisions of "Method make delegate"

From Ribbon Commander Documentation
Jump to: navigation, search
(rxCustomUI.make_delegate(string) As rxDelegate)
(rxCustomUI.make_delegate(string) => rxDelegate)
Line 3: Line 3:
  
 
== Parameters ==
 
== Parameters ==
=== rxCustomUI.make_delegate(string) => rxDelegate ===
+
=== rxCustomUI.make_delegate(string) -> rxDelegate ===
 
{{FuncTableBegin}}
 
{{FuncTableBegin}}
 
{{FuncTableEntry | name=methodName | type=string | value=''[none]'' | desc=The name of the target callback function}}
 
{{FuncTableEntry | name=methodName | type=string | value=''[none]'' | desc=The name of the target callback function}}

Revision as of 16:47, 14 March 2013

Description

Creates a new rxDelegate object associated to a callback function and owned by the rxCustomUI instance.

Parameters

rxCustomUI.make_delegate(string) -> rxDelegate

Parameter Name
Parameter Type
Default Value
Description
methodName string [none] The name of the target callback function
return rxDelegate [none] The newly created rxDelegate

rxCustomUI.make_delegate(Delegate) -> rxDelegate

Parameter Name
Parameter Type
Default Value
Description
callbackDelegate Delegate [none] An instance of a .NET delegate used to dispatch the callback
return rxDelegate [none] The newly created rxDelegate

Remarks

  1. (VBA-specific) If the rxCustomUI object has global dispatch scope, the target function needs to be a global member of a standard VBA module
  2. Otherwise the target function needs to be a public method of the object used as the rxCustomUI's dispatch object.
  3. (.NET-specific) By using the second method override, Native .NET delegates can be used to instantiate rxDelegate objects. There is a [control name]Delegates class for every Dynamic RibbonX control in namespace LogismiX.DynamicRibbonX.Core that specifies the callback signature of every callback (see Examples).

Examples

VBA

  1.  

C#

  1.  

VB.NET

  1.  

C++

  1.