Not possible to set the property "Hidden" of an annotation

Hello,

i’m trying to make an annotation not visible. According to the API documentation this can be done by using the property “hidden”. There is getter and a setter, then I think I should be able to set this property.
Unfortunatelly there is no way to make it work.

The same piece of code is working for a widget, but it does not worl for an annotation.

Best Regards,

Hi there,

You need to redraw the annotation after setting the Hidden property (uppercase ‘H’):

    annot.Hidden = true;
    instance.Core.annotationManager.redrawAnnotation(annot)

Thanks!
Logan

Thank you !
It is working now on my side.

This code below works.
But something troubles me…
If the annotation is a widget, then I write “hidden” with lower case.
If the annotation is not a widget, then I write “Hiden” in uppercase.

That’s strange isn’t it ?

image

Best Regards,

Hey there,

All annotations extend a base class with a Hidden property, meaning Hidden should work for all types of annotations.

Logan