A guest-induced reversible switching of a self-assembled H-bonded supramolecular framework.