Pages Widget: Subpages only visible when you click on parent

Hi. In the Pages widget that comes with wordpress, all pages and subpages are displayed all the time.
I'd like to only show Pages with no parent in the widget.
Subpages would only show when the user clicks on their Parent Page.
Subpages of other Parent pages should stay hidden.

How could this be achieved? Plug-in or Theme?