Print Page | Close Window

Gallery and Checked Item

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=7893
Printed Date: 03 March 2025 at 5:12am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Gallery and Checked Item
Posted By: rupert
Subject: Gallery and Checked Item
Date Posted: 28 August 2007 at 7:23pm
How can I use the CheckedItem property? I have a gallery of icons and I am unable to get it to work. How can I display the 2nd item as checkeditem?
 
I was trying to use this example code snippet.
 
    Set GroupStyles = TabWrite.Groups.AddGroup("&Styles", ID_GROUP_STYLES)
    Dim GalleryStyles As CommandBarGallery
       
   
    Set ItemsStyles = CommandBars.CreateGalleryItems(ID_GALLERY_STYLES)
    ItemsStyles.Icons = ImageManagerGalleryStyles.Icons
    ItemsStyles.ItemWidth = 72
    ItemsStyles.ItemHeight = 56
   
    For i = 1 To 16
        ItemsStyles.AddItem i, ""
    Next i
   
    Set GalleryStyles = GroupStyles.Add(xtpControlGallery, ID_GALLERY_STYLES, "Styles")
    GalleryStyles.Width = 235
    GalleryStyles.SetItemsMargin 0, 1, 0, 1
    GalleryStyles.ShowLabels = False
    GalleryStyles.ShowBorders = True
    Set GalleryStyles.Items = ItemsStyles
    GalleryStyles.CheckedItem = 2 ' this does not work 
   
    Dim GalleryPopupBar As CommandBar
    Set GalleryPopupBar = CommandBars.Add("Styles", xtpBarPopup)
   
    GalleryStyles.CommandBar = GalleryPopupBar
   
    Set GalleryStyles = GalleryPopupBar.Controls.Add(xtpControlGallery, ID_GALLERY_STYLES, "Styles")
    GalleryStyles.Width = 235 + 72
    GalleryStyles.Height = 56 * 3 + 2



Replies:
Posted By: Oleg
Date Posted: 03 September 2007 at 5:56am
Hi,
 
Have to work. Think you modified our sample which is reset CheckedItem  in Update handler.


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



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