Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Gallery Item ID
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Gallery Item ID

 Post Reply Post Reply
Author
Message
LeeHayton View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 November 2005
Location: United Kingdom
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote LeeHayton Quote  Post ReplyReply Direct Link To This Post Topic: Gallery Item ID
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 17 November 2007 at 1:01am
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
Back to Top
LeeHayton View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 November 2005
Location: United Kingdom
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote LeeHayton Quote  Post ReplyReply Direct Link To This Post Posted: 19 November 2007 at 4:28am
Thanks - that worked fine.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.