wxTreeCtrl SetItemImage() behavior?

This is a bit strange.

I have a wxTreeCtrl where I want the images of certain items to remain the
same whether they are 'Normal', 'Selected', or 'SelectedExpanded'. I have
defined a method as below for accomplishing this:

    def setSingleItemImage(self, item, imageIndex):
        self.hierTreeCtrl.SetItemImage(item, imageIndex,
wxTreeItemIcon_Normal)
        self.hierTreeCtrl.SetItemImage(item, imageIndex,
wxTreeItemIcon_Selected)
        #self.hierTreeCtrl.SetItemImage(item, imageIndex,
wxTreeItemIcon_SelectedExpanded)

Note that the last line is commented out. As it is, this method works
fine. If I include the last line, then whenever a *child* node is
selected, the image in its *parent* node disappears!! Also, the *first*
time a node is expanded, its image disappears, but if you then collapse it
the image reappears and if you expand it again the image then does *not*
disappear.

The TreeCtrl is defined with style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT

wxSUNKEN_BORDER | wxTR_HIDE_ROOT.

Any thoughts?

···

--------------------------------------
Gary H. Merrill
Director and Principal Scientist, New Applications
Data Exploration Sciences
GlaxoSmithKline Inc.
(919) 483-8456