base.OnMouseDoubleClick(e); //creates a sticky note popup when clicking on a circle annotation
int numAnnots = THISPAGE.GetNumAnnots();
for (int i = 0; i < numAnnots; i++)
{
Annot annot = THISPAGE.GetAnnot(i);
if (!annot.IsValid()) continue;
if (annot.GetType() == Annot.Type.e_Circle)
{
Circle circle = new Circle(annot); //this should be the circle that was clicked on
Popup pop = circle.GetPopup(); //this should the resulting popup
pop.SetRect(new Rect(100,100,400,400)); // I want to relocate the popup
pop.GetRect().Update();
if (pop.IsOpen()) pop.SetOpen(false); // and I want to close it
annot.RefreshAppearance();
pop.RefreshAppearance();
Update();
UpdatePageLayout();
}
}
}
}
The sticky note popup still stays open, though, and it doesn't move. I have checked to make sure circle and pop are the correct annotations, and not new instances. I have also checked to make sure the variables are getting set, and they are. I am literally out of ideas. I have tried manually creating a sticky note popup using Popup.Create(...) and adding it to the page with AnnotPushBack() and with AnnotPushFront(), but then it doesn't show up even after Update() and UpdatePageLayout().