Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - How can I identify a galleryitem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How can I identify a galleryitem

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

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Topic: How can I identify a galleryitem
    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
Back to Top
Peter59 View Drop Down
Groupie
Groupie


Joined: 19 July 2007
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote Peter59 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post 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
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.203 seconds.