Print Page | Close Window

Map a control ID to certain icon ID?

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=13970
Printed Date: 28 February 2025 at 3:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Map a control ID to certain icon ID?
Posted By: znakeeye
Subject: Map a control ID to certain icon ID?
Date Posted: 10 April 2009 at 4:37am
Is it possible to map a certain control ID to a certain icon ID, so that it gets this icon whereever possible? I know I can call SetIconId(), but that is not always possible (e.g. you show a CMenu through XTResourceManager()).
 
Something like this:
SetIcons(controlID_list, iconID_list);
 
Is this possible?


-------------
PokerMemento - http://www.pokermemento.com/



Replies:
Posted By: Oleg
Date Posted: 10 April 2009 at 6:34am
Hi,
You can enable Actions and assign iconId to corresponded action.
See Actions sample.


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


Posted By: randallmking
Date Posted: 11 April 2009 at 5:17pm
I have been unable to get the Actions to work for IconID. The ActionsSampe for VB does not show an IconID sampe and if I add the code:
 
Commandbars.Actions(ID_FILE_NEW).IconID = ID_EDIT_UNDO, then the image is empry on the ID_FILE_NEW button and menu
 
When I attempt to use Actions with IconID in my program I get the error message:
 
"Object does not support this property or method"
 
But I can use Actions to change the other properties such as Tag or Enabled.
 
CommandBars.Actions.Add ID_CalcZone_Dropdown, "Calculation Zone", "Insert a Calculation Zone", "", "Calculation Zone"
 
'add Control in another function
 
CommandBars.Actions(ID_CalcZone_Dropdown).Enabled = False (this works)
 
CommandBars.Actions(ID_CalcZone_Dropdown).IconID = ID_CalcZone_Rectangle (this creates the error message)



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