Print Page | Close Window

How can I identify a galleryitem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=18580
Printed Date: 06 October 2024 at 12:27am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How can I identify a galleryitem
Posted By: Fabian
Subject: How can I identify a galleryitem
Date Posted: 22 June 2011 at 5:53am
If I click on a galleryitem the Control.ID in the Excute event is always the id of the control hosting the items. But I need an identification of the clicked gallery item.
 
I am sure I miss something
Can someone please help?
 
Thanks in advance
Fabian


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6



Replies:
Posted By: Peter59
Date Posted: 22 June 2011 at 7:23am
Hello Fabian,

you have to catch the corresponding CommandBarGallery object, which has an ID Property (assigned with the AddItem method of the CommandBarGalleryItems object). See for instance RibbonSample:


Private Sub CommandBars_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)

    Select Case Control.id
    Case ...
    Case ID_GALLERY_STYLES:
        Dim Gallery As CommandBarGallery
       
        Set Gallery = Control

        If Not Gallery.SelectedItem Is Nothing Then
            SelectedStyle = Gallery.SelectedItem.Id
        End If
    Case Else
    End Select

End Sub



Good luck,
Peter


-------------
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6


Posted By: Fabian
Date Posted: 22 June 2011 at 8:20am
Hi Peter,
 
That's exactly was I looked for!
 
Thanks, thanks, thaks Clap
 
Fabian


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net