Whiptail doesn't do that. It's designed to imitate an old version of dialog. The underlying library (newt) is used by python scripts to implement some more involved user interfaces, but aside from reading the source code (and a _**very**_ old tutorial), there's no documentation.