P
Peter Hartlén
Hi!
Using PocketPC 2003 SE, CF 1 SP3
I'm switching the toolbar icon of a certain toolbar button. The icon is
identical except for a red cross in the upper right corner. The problem is
that when switching from the icon with red cross to the icon without, the
cross remains.
I've tried toolBar.Refresh, toolBar.Invalidate(), and
this.Invalidate(toolBar.ClientRectangle) but it seems this can't be done
this way. Leaving and entering the screen works however...
I just change the image index of the ToolBarButton like this:
if ( foo )
toolBar.Buttons[m_iBtnCameraIndex].ImageIndex = m_iIcoCamera1Index;
else
toolBar.Buttons[m_iBtnCameraIndex].ImageIndex = m_iIcoCamera2Index;
//toolBar.Refresh();
//toolBar.Invalidate();
this.Invalidate(toolBar.ClientRectangle);
Any ideas?
Thanks,
Peter
Using PocketPC 2003 SE, CF 1 SP3
I'm switching the toolbar icon of a certain toolbar button. The icon is
identical except for a red cross in the upper right corner. The problem is
that when switching from the icon with red cross to the icon without, the
cross remains.
I've tried toolBar.Refresh, toolBar.Invalidate(), and
this.Invalidate(toolBar.ClientRectangle) but it seems this can't be done
this way. Leaving and entering the screen works however...
I just change the image index of the ToolBarButton like this:
if ( foo )
toolBar.Buttons[m_iBtnCameraIndex].ImageIndex = m_iIcoCamera1Index;
else
toolBar.Buttons[m_iBtnCameraIndex].ImageIndex = m_iIcoCamera2Index;
//toolBar.Refresh();
//toolBar.Invalidate();
this.Invalidate(toolBar.ClientRectangle);
Any ideas?
Thanks,
Peter