Sorry for reviving an old thread, but I believe it is relevant. I’m trying to use the custom component meredydd posted. I get it to work as advertised when linking in the same form. How would this work when linking from a separate form? I tried this (linking from one form to an FAQ form):
Current form where link is:
from FAQ import FAQ
...
def faq_link_click(self, **event_args):
open_form('FAQ')
FAQ.scroll_anchor_1.scroll_into_view()
The form opens but then gives an error that FAQ does not have the scroll_anchor_1 property. My thought was to pass an argument to open_form like: open_form('FAQ', anchor=1)
But I’m unsure how to grab this on the destination form? If I can do that I can write a simple constructor to dynamically call the component based on the anchor number (scroll_anchor_1, 2, etc.).