Jump to: navigation, search

Addon:Python Shell Gramplet

701 bytes added, 21:26, 2 January 2018
Added example for accessing a Gramplet object in Gramps4
This following returns a reference to a loaded Gramplet object on the Event view - useful when developing Gramplets. Note that the Events view must be navigated first, as main views are lazy loading in Gramps 4.
{| border="1" style="border-collapse:collapse"
! Gramps 4.x
| <pre>
> evtview = uistate.viewmanager.pages[uistate.viewmanager.page_lookup.get((5,0))]
> # list all TabGramplet objects loaded for Events view
> [child.get_title() for child in evtview.bottombar.get_children()]
['Gallery', 'Citations', 'Notes', 'Attributes', 'References', 'Event PlaceTitle Compare Gramplet']
> get a reference to my custom Gramplet object
> eptcGramplet = evtview.bottombar.get_children()[5].pui

Navigation menu