P
Peter Marchert
Hello,
I try to set the default value for a dropdown control in a ribbon.
This is the xml part of the dropdown:
<dropDown id="dropDownControl"
getSelectedItemIndex="CallBackSelectedItemIndex"
onAction="CallBackOnAction"
visible="true">
<item id="dropDownItem0" label="Test1" />
<item id="dropDownItem1" label="Test2" />
<item id="dropDownItem2" label="Test3" />
</dropDown>
The callback procedure "onAction" does always work but the
getSelectedItemIndex (same for getSelectedItemID) does not work
correctly.
Here are some examples of the definition for the callback procedure
which works (the message box appears):
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl)
MsgBox Ctrl.id
End Sub
Public Sub CallBackSelectedItemIndex(ByVal Ctrl As IRibbonControl)
MsgBox Ctrl.id
End Sub
Public Sub CallBackSelectedItemIndex(ByRef Ctrl As IRibbonControl)
MsgBox Ctrl.id
End Sub
But if a second parameter is used the message box will not appear. I
tried this combinations:
Public Sub CallBackSelectedItemIndex(ByVal Ctrl As IRibbonControl,
ByRef Index)
Public Sub CallBackSelectedItemIndex(ByRef Ctrl As IRibbonControl,
ByRef Index)
Public Sub CallBackSelectedItemIndex(ByRef Ctrl As IRibbonControl,
ByRef Index As Integer)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, Index)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, Index As
Integer)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, Index As
Long)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, ByRef
Index As Integer)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, ByRef
Index As Long)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, ByRef
Index As Byte)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, ByRef
Index As Single)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, ByRef
Index As Double)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, ByRef
Index As String)
Public Sub CallBackSelectedItemIndex(ByVal Ctrl As IRibbonControl,
ByRef Index As Variant)
I'm using the Office Developer XP to create Com-Add-Ins and designed
it under Microsoft Outlook 2002. To use the ribbons I have implemented
this type library: http://xldennis.wordpress.com/2006/...dalone-type-library-for-iribbonextensibility/
Is it possible that this library is not correct/complete (it is from
2006)?
I worked on this problem now for 2 days and wonder that other users
does not have this problem. Can somebody who uses VB6 try this example
and report if it works with it?
Thanks
Peter
I try to set the default value for a dropdown control in a ribbon.
This is the xml part of the dropdown:
<dropDown id="dropDownControl"
getSelectedItemIndex="CallBackSelectedItemIndex"
onAction="CallBackOnAction"
visible="true">
<item id="dropDownItem0" label="Test1" />
<item id="dropDownItem1" label="Test2" />
<item id="dropDownItem2" label="Test3" />
</dropDown>
The callback procedure "onAction" does always work but the
getSelectedItemIndex (same for getSelectedItemID) does not work
correctly.
Here are some examples of the definition for the callback procedure
which works (the message box appears):
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl)
MsgBox Ctrl.id
End Sub
Public Sub CallBackSelectedItemIndex(ByVal Ctrl As IRibbonControl)
MsgBox Ctrl.id
End Sub
Public Sub CallBackSelectedItemIndex(ByRef Ctrl As IRibbonControl)
MsgBox Ctrl.id
End Sub
But if a second parameter is used the message box will not appear. I
tried this combinations:
Public Sub CallBackSelectedItemIndex(ByVal Ctrl As IRibbonControl,
ByRef Index)
Public Sub CallBackSelectedItemIndex(ByRef Ctrl As IRibbonControl,
ByRef Index)
Public Sub CallBackSelectedItemIndex(ByRef Ctrl As IRibbonControl,
ByRef Index As Integer)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, Index)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, Index As
Integer)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, Index As
Long)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, ByRef
Index As Integer)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, ByRef
Index As Long)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, ByRef
Index As Byte)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, ByRef
Index As Single)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, ByRef
Index As Double)
Public Sub CallBackSelectedItemIndex(Ctrl As IRibbonControl, ByRef
Index As String)
Public Sub CallBackSelectedItemIndex(ByVal Ctrl As IRibbonControl,
ByRef Index As Variant)
I'm using the Office Developer XP to create Com-Add-Ins and designed
it under Microsoft Outlook 2002. To use the ribbons I have implemented
this type library: http://xldennis.wordpress.com/2006/...dalone-type-library-for-iribbonextensibility/
Is it possible that this library is not correct/complete (it is from
2006)?
I worked on this problem now for 2 days and wonder that other users
does not have this problem. Can somebody who uses VB6 try this example
and report if it works with it?
Thanks
Peter