ICommandItem.Refresh doesn't call ICommand.Bitmap

379
6
02-22-2010 06:07 PM
JohnRogers
New Contributor
Not sure if is is too early to be reporting problems seen in C++.

We have a toolbar button that changes its bitmap depending on state. When the state changes we swap the bitmap returnd by ICommand then get the corresponding ICommandItem from the ICommandBars.Find() method and call Refresh. In previous versions this caused the new bitmap to be displayed on the button.

Not sure if this is an intentional change, or a by-product of the toolbar changes.
0 Kudos
6 Replies
JeanJuengling
New Contributor
I am having a similar issue.  The code below works in 9.3.1.  In 9.4, it does not seem to set the CommandItem after finding it.  It does not throw an error.  It just stops and does not execute the CommandItem.

Set pCommandItem = Application.Document.CommandBars.Find("Project.ClickParcel")
Set Application.CurrentTool = pCommandItem
pCommandItem.Execute
0 Kudos
JohnRogers
New Contributor
I wasn't sure if this forum or ESRI Support was the right way to report this type of issue - so I also entered a support request for it. Support responded:

"According to the following blog post, (9.4/10) Beta is fully-supported by ESRI Technical Support; testers can contact us anytime.

http://blogs.esri.com/Support/blogs/supportcenter/archive/2009/11/13/looking-to-the-future.aspx"

After some follow up I was informed that this is already a known issue:

"I was able to reproduce the issue you mentioned in your email. After some research I found out that this is a known issue. Though the synopsis of this defect does not exactly match your description, it contains information similar to that described in your email. The defect # is,

NIM054116  Basecommand::UpdateBitmap Property is ineffective in ArcGIS 10 Beta 2 (Product Version:9.4.0.2307)"
0 Kudos
JohnRogers
New Contributor
I just checked my support incident - which is marked as Closed. But testing the the Prerelease shows that the bad behavior remains. The bitmap is not updated.
Have queried this will ESRI support.
0 Kudos
JeyasinghNavaneethan
New Contributor
Any updates with PreRelease version...
0 Kudos
WayneGuidry
New Contributor III
I'm seeing this in our C# application that is using ArcGIS 10.0 SP2. Has there been any word from ESRI what version this issue will be fixed in?
0 Kudos
MHawkins
New Contributor
Any solutions or tips for this yet? I'm running ArcGIS 10 SP 4 and have a similar issue. Sometimes the button redraws with the correct image sometimes I have to drag the cursor across it before the button image changes. I've tried calling iapplication.refreshwindow after icommand.refresh and get the same result.

Any suggestions would help. Thanks!
0 Kudos