Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - How do I show a gallery item as checked?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How do I show a gallery item as checked?

 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: How do I show a gallery item as checked?
    Posted: 01 October 2008 at 5:04am
I would like to show a gallery item as checked but the ".Checked" property does not appear for a type GalleryItem.
 
How do I do it?
 
Thanks
Lee
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: 01 October 2008 at 5:13am
Hi,
Use CheckedItem property of CommandBarGallery.
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: 01 October 2008 at 5:23am
Here is my code - can you please show me how to make an item in the gallery appear checked?
 
Thanks
Lee
 
Dim cbp As CommandBarPopup, cbg As CommandBarGallery, cbgis As CommandBarGalleryItems, cbgi As CommandBarGalleryItem
With CommandBars1
    Set cbp = .ActiveMenuBar.Controls.Add(xtpControlPopup, 1, "Reports")
        Set cbg = cbp.CommandBar.Controls.Add(xtpControlGallery, 2, "Gallery 1")
            Set cbgis = .CreateGalleryItems(1)
                cbgis.ItemWidth = 0
                Set cbgi = cbgis.AddItem(1, "Gallery Item 1")
                Set cbgi = cbgis.AddItem(1, "Gallery Item 2")
                Set cbgi = cbgis.AddItem(1, "Gallery Item 3")
   
        Set cbg.Items = cbgis
End With
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: 01 October 2008 at 2:10pm
cbg.CheckedItem = 1
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: 02 October 2008 at 4:48am

You are setting the GALLERY to checked.

How do I set a GALLERY ITEM to Checked?
 
Please show me how to check the 2nd item in the gallery as I would have expected the galleryitem to have a .checked property but it does not .
 
Thanks
Lee
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: 02 October 2008 at 4:52am

Forget that.....I see my big ERROR - I have set each GalleryItem.ID to 1 by mistake.

                Set cbgi = cbgis.AddItem(1, "Gallery Item 1")
                Set cbgi = cbgis.AddItem(1, "Gallery Item 2")
                Set cbgi = cbgis.AddItem(1, "Gallery Item 3")
 
SORRY.
 
Thanks
Lee
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.172 seconds.