How can I change the Display Mode of a InteractiveObject in Local Context?

I need to directly change the Display Mode of some Interactive Objects in Neutral Point or Local Contexts. But in Local Contexts
the Function "SetDisplayMode(..)" doesn't work.
Who have the same Problem and good solution?

Hugues's picture

I have had the same problem.
Instead of AIS_InteractiveContext::SetDisplayMode I use the local context version of AIS_InteractiveContext::Display, i.e. :
void Display
(const Handle(AIS_InteractiveObject)& anIobj,
const Standard_Integer amode,
const Standard_Integer aSelectionMode,
const Standard_Boolean
updateviewer = Standard_True,
const Standard_Boolean
allowdecomposition = Standard_True);

Giving "amode" AIS_Shaded or AIS_WireFrame.