Getting a Text Frame's Page

"Matt Miller" <matt.miller-97jfqw80gc5Wk0Htik3J/[email protected]> Wed, 13 Apr 2022 16:42:24 -0700
Newsgroups gmane.comp.graphics.scribus
Message-ID <[email protected]>
From Python I want to find the page number that contains a certain text frame. I know the object name of the frame I'm looking for, but I don't know what page it's on. The only way I've thought of is to loop page-by-page over the document, and for each page use getAllObjects() to see if the frame is on that page. The documents are typically hundreds or even a couple thousand pages. I'm hoping for a faster way.

From the GUI I see that if I click on an object to select it, then the page returned by currentPage() is what I'm looking for, but if I just call selectObject() then currentPage() doesn't seem to care.

Thanks.


--

  Matt Miller
  mailto:matt.miller-97jfqw80gc5Wk0Htik3J/[email protected]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20220413/a7f1d8c6/attachment.htm>
___
Scribus Mailing List: [email protected]
Edit your options or unsubscribe:
http://lists.scribus.net/mailman/listinfo/scribus
See also:
http://wiki.scribus.net
http://forums.scribus.net