How to: Close custom dialog when closing lister or tab

I checked the tab and lister object, but I didn't find a parameter that returns a value when it is closed.

There are events for those things.