How do I show a gallery item as checked? |
Post Reply |
Author | |
LeeHayton
Senior Member Joined: 25 November 2005 Location: United Kingdom Status: Offline Points: 102 |
Post Options
Thanks(0)
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
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Use CheckedItem property of CommandBarGallery.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
LeeHayton
Senior Member Joined: 25 November 2005 Location: United Kingdom Status: Offline Points: 102 |
Post Options
Thanks(0)
|
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
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
cbg.CheckedItem = 1
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
LeeHayton
Senior Member Joined: 25 November 2005 Location: United Kingdom Status: Offline Points: 102 |
Post Options
Thanks(0)
|
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
|
|
LeeHayton
Senior Member Joined: 25 November 2005 Location: United Kingdom Status: Offline Points: 102 |
Post Options
Thanks(0)
|
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
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |