from enaml.converters import IntConverter

defn PersonWindow(model):
    Window -> main_window:
        title << model.name
        Form -> person_form:
            Label:
                text = 'Name:'
            Field:
                value := model.name
                hug_width = 'ignore'
            Label:
                text = 'Age:'
            Field:
                value := model.age
                converter = IntConverter()
                hug_width = 'ignore'
            Label:
                text = 'Address:'
            Field:
                value := model.address
                hug_width = 'ignore'
            
