Print Page | Close Window

ImageManagerIcons question -- image by index

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


Topic: ImageManagerIcons question -- image by index
Posted By: MadRiver
Subject: ImageManagerIcons question -- image by index
Date Posted: 01 December 2008 at 12:46pm
Is it possible to get an image by index, and then get the command ID associated with that image?



-------------
Xtreme CommandBars ActiveX v 12.1.0




Replies:
Posted By: SuperMario
Date Posted: 01 December 2008 at 1:11pm
The image manager does not know which commands use them.  What are you needing this for?


Posted By: nighthawk
Date Posted: 02 December 2008 at 2:35am
I believe your only option would be to loop through the CommandBarControls collection and check each control to see if the icon ID matches your image index.  I guess you could also create your own data structure to store the information.  It would require more code but would probably be more efficient.

-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0


Posted By: MadRiver
Date Posted: 02 December 2008 at 8:31am
Thanks for the reply.
I am using your second approach: when we load the images we populate a map of image index->command id.

Background: Users can add toolbar buttons via script; in the script they can select an icon to use by specifying its index in our default set of images.

-------------
Xtreme CommandBars ActiveX v 12.1.0




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