NotoriousPopol
Board Regular
- Joined
- Jun 28, 2016
- Messages
- 192
Hi guys! SORRY I don't use the code balise cause it (seems) not to work with things like < /> ...
I'm working on Custom Ribbon atm, and I try to add a gallery to a dynamic menu. I think it is possible but my code doesnt work.
The goal : to have a gallery with dynamic row a column numbers.
Questions : do YOU think this is possible? If not, what alternatives? If yes, do you know what I'm doing wrong? Thanks!
This is what I use now :
CallBack for the Dynamic Menu (work fine with just simple buttons) :
Public Sub CreationMenuDynamique(ctl As IRibbonControl, ByRef content)
'ouverture de la balise menu
content = "<menu xmlns="" http:="" schemas.microsoft.com="" office="" 2006="" 01="" customui""="">"
'put the gallery
content = content & GoGallery
'fermeture de la balise
content = content & "</menu>"
Debug.Print content
End Sub
Code to build the gallery :
Private Function GoGallery() As String
Dim strTemp As String
Dim Ws As Worksheet
Dim i As Integer
' Insertion d'un titre de menu
strTemp = "<menuseparator id="" feuilles""="" title="">"
For i = 1 To 1
strTemp = strTemp & _
"<gallery "="" &="" _
CreationAttribut("id", "rxgal" & i) & " " & _
CreationAttribut("label", "MyGal" & i) & " " & _
CreationAttribut("columns", "3") & " " & _
CreationAttribut("rows", "5") & " " & _
CreationAttribut("imageMso", "HappyFace") & " " & _
CreationAttribut("getItemCount", "rxgal_getItemCount") & " " & _
CreationAttribut("getItemLabel", "rxgal_getItemLabel") & " " & _
CreationAttribut("getItemScreentip", "rxgal_getItemScreenTip") & " " & _
CreationAttribut("onAction", "rxgal_Click") & " " & _
CreationAttribut("size", "normal") & ">"
Next
strTemp = strTemp & "</gallery>"
GoGallery = strTemp
End Function<menuseparator id="" feuilles""="" title="">
Code the write attributes :
</menuseparator></menuseparator>
I'm working on Custom Ribbon atm, and I try to add a gallery to a dynamic menu. I think it is possible but my code doesnt work.
The goal : to have a gallery with dynamic row a column numbers.
Questions : do YOU think this is possible? If not, what alternatives? If yes, do you know what I'm doing wrong? Thanks!
This is what I use now :
CallBack for the Dynamic Menu (work fine with just simple buttons) :
Public Sub CreationMenuDynamique(ctl As IRibbonControl, ByRef content)
'ouverture de la balise menu
content = "<menu xmlns="" http:="" schemas.microsoft.com="" office="" 2006="" 01="" customui""="">"
'put the gallery
content = content & GoGallery
'fermeture de la balise
content = content & "</menu>"
Debug.Print content
End Sub
Code to build the gallery :
Private Function GoGallery() As String
Dim strTemp As String
Dim Ws As Worksheet
Dim i As Integer
' Insertion d'un titre de menu
strTemp = "<menuseparator id="" feuilles""="" title="">"
For i = 1 To 1
strTemp = strTemp & _
"<gallery "="" &="" _
CreationAttribut("id", "rxgal" & i) & " " & _
CreationAttribut("label", "MyGal" & i) & " " & _
CreationAttribut("columns", "3") & " " & _
CreationAttribut("rows", "5") & " " & _
CreationAttribut("imageMso", "HappyFace") & " " & _
CreationAttribut("getItemCount", "rxgal_getItemCount") & " " & _
CreationAttribut("getItemLabel", "rxgal_getItemLabel") & " " & _
CreationAttribut("getItemScreentip", "rxgal_getItemScreenTip") & " " & _
CreationAttribut("onAction", "rxgal_Click") & " " & _
CreationAttribut("size", "normal") & ">"
Next
strTemp = strTemp & "</gallery>"
GoGallery = strTemp
End Function<menuseparator id="" feuilles""="" title="">
Code the write attributes :
Code:
Function CreationAttribut(strAttribut As String, Donnee As String) As String
CreationAttribut = strAttribut & "=" & Chr(34) & Donnee & Chr(34)
End Function
Last edited: