Does anyone know how to set the format of let's say a text box using format objects at run-time?

The particular format I am looking for is boolean.