![]() |
Gallery Item ID |
Post Reply ![]() |
Author | |
LeeHayton ![]() Senior Member ![]() ![]() Joined: 25 November 2005 Location: United Kingdom Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() Posted: 16 November 2007 at 10:11am |
How do I detect which gallery Item has been clicked?
When I run this code It does not display the Gallery Item ID but the ID of the Gallery.
Thanks
Lee
Private Sub Form_Load()
Dim ComboPopup As CommandBar, cbp As CommandBarPopup, cbg As CommandBarGallery, cbgis As CommandBarGalleryItems, cbgi As CommandBarGalleryItem
With CommandBars1 Set cbp = .ActiveMenuBar.Controls.Add(xtpControlPopup, 1, "Add") Set cbg = cbp.CommandBar.Controls.Add(xtpControlGallery, ID_Garrery, "Gallery") cbg.Height = 250 cbg.Controls.Add xtpControlButton, 1, "Edit List" 'cbg.CloseSubMenuOnClick = False Set cbgis = .CreateGalleryItems(ID_Gallery) cbgis.ItemWidth = 0 'cbgis.ItemHeight = 26 'cbgis.AddLabel "Gallery Items" cbgis.AddItem 11, "Item 1" cbgis.AddItem 12, "Item 2" cbgis.AddItem 13, "Item 3" Set cbg.Items = cbgis End With End Sub Private Sub CommandBars1_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
MsgBox Control.Id End Sub |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Just pasted from Rbbonsample:
Dim Gallery As CommandBarGallery
Set Gallery = Control If Not Gallery.SelectedItem Is Nothing Then SelectedStyle = Gallery.SelectedItem.Id End If |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
LeeHayton ![]() Senior Member ![]() ![]() Joined: 25 November 2005 Location: United Kingdom Status: Offline Points: 102 |
![]() ![]() ![]() ![]() ![]() |
Thanks - that worked fine.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |