Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Gallery and Checked Item
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Gallery and Checked Item

 Post Reply Post Reply
Author
Message
rupert View Drop Down
Newbie
Newbie


Joined: 28 August 2007
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote rupert Quote  Post ReplyReply Direct Link To This Post Topic: Gallery and Checked Item
    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
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: 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
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.047 seconds.