Adds functionality for showing and hiding the page control