PDA

View Full Version : Can someone explain "contentanchor" to me?



SilentRuin
February 15th, 2021, 04:09
Occasionally I hear about an extension writing over another extensions fields. I've tried to be very safe in this regard by using anchors that are relative and based off things like the "contentanchor".

What is "contentanchor"? Does it get redefined any time the content gets changed or expanded? Is an extension responsible to redefine it if they put stuff relative to it?

Trying to understand how to make a fool proof system (if possible) when you place anchor points in a sheet like combat tracker that others may be using. I know I can't prevent some hard coded fields stomping me - but if everyone plays relative off of something like "contentanchor" I was hoping that would be safe.

But I don't really understand what it is and who defines it or redefines it.

Moon Wizard
February 15th, 2021, 04:19
contentanchor is just a commonly named generic control that can be used to provide top/left/right anchors from the title/header of a window. Just follow the template inheritance until you get to genericcontrol.

Regards,
JPG

SilentRuin
February 15th, 2021, 04:28
contentanchor is just a commonly named generic control that can be used to provide top/left/right anchors from the title/header of a window. Just follow the template inheritance until you get to genericcontrol.

Regards,
JPG

So its just a normal control name? No special logic to reset it to a new position for things that call it later?

Moon Wizard
February 15th, 2021, 04:30
No, it's just a generic control with no height. I have used it as a common control name that can be used to anchor from the bottom of the title/header of a window; and is defined by many templates.

Regards,
JPG

SilentRuin
February 15th, 2021, 04:31
No, it's just a generic control with no height. I have used it as a common control name that can be used to anchor from the bottom of the title/header of a window; and is defined by many templates.

Regards,
JPG

Ok thanks. So no magic thing extensions can use that guarantee not to step on each other by following that mechanism. Drat.