Print Page | Close Window

How do I show a gallery item as checked?

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=12306
Printed Date: 07 October 2024 at 12:25pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How do I show a gallery item as checked?
Posted By: LeeHayton
Subject: How do I show a gallery item as checked?
Date 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



Replies:
Posted By: Oleg
Date Posted: 01 October 2008 at 5:13am
Hi,
Use CheckedItem property of CommandBarGallery.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: LeeHayton
Date 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


Posted By: Oleg
Date Posted: 01 October 2008 at 2:10pm
cbg.CheckedItem = 1

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: LeeHayton
Date 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


Posted By: LeeHayton
Date 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



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