Print Page | Close Window

addicons commandbars method

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=10239
Printed Date: 08 October 2024 at 12:41am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: addicons commandbars method
Posted By: muldoon96
Subject: addicons commandbars method
Date Posted: 15 April 2008 at 11:28am
Hi
 
I am using CodeJock 11.1.3 with Progress 10.1 B. I have an ImageManager and a CommandBarFrames in my design window, and I am trying to get the CommandBarsFrame to use the icons in the ImageManager:
 
chcommandbar.commandbarsframe.icons.addicons (chimagemanager.imagemanager.icons)
 
but I get the error 'invalid component handle referenced while processing method/statement: addicons'
 
It works fine if I simply do this:
 
chcommandbar.commandbarsframe.icons = chimagemanager.imagemanager.icons
 
I am just a bit concerned doing it this way as I cannot find anything in the CodeJock documentation that says you can simply set one to equal the other - the documentation says use 'addicons' which doesn't seem to work for me.



Replies:
Posted By: Oleg
Date Posted: 15 April 2008 at 11:53am
Hi,
Yes its "official" method to assign icons :)


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


Posted By: muldoon96
Date Posted: 15 April 2008 at 11:57am
Sorry Oleg, I'm not quite clear - you are saying that they way I am doing it is correct, and the 'addicons' method should not be used ?


Posted By: Oleg
Date Posted: 15 April 2008 at 12:13pm
Yes, your method is correct. 'addicons' will not work because by default CommandBarsframe.Icons returns Null.

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


Posted By: muldoon96
Date Posted: 15 April 2008 at 12:22pm
Thanks Oleg.  Can I ask you two more questions on this please? 
 
I am actually adding icons to a Shortcutbar control and then setting my CommandbarsFrame icons by doing this:
 
chcommandbar.commandbarsframe.icons = chshortcutbar.shortcutbar.icons
 
Would it be better to add the icons to an ImageManager control and then set both the ShortCutBar and the CommandbarsFrame to use the icons there, as below, or does it not really matter?
 
chshortcutbar.shortcutbar.icons = chimagemanager.imagemanager.icons
 
chcommandbar.commandbarsframe.icons = chimagemanager.imagemanager.icons
 
The second question is to do with ImageManagerIcons.loadbitmap.  I am actually loading .png files and it seems to work, but the documentation says you must load .bmp files.  Is the documentation out-of-date ?



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