# Filename: gui_pan_if.py
# Purpose:  Create a panel with a checkbox, static text, and an editbox.
# Results:  Basic panel using if statement.
#           If checkbox = True, then editbox is enabled and static text is disabled.
#           If checkbox = False, then editbox is disabled and static text is enabled.

from maptek import vulcan_gui

pan = vulcan_gui.panel("Basic Panel")
pan.checkbox(tag='check', prompt='Use Alternative Value', checked=False)

pan.pan_if() # editbox will only be enabled if checkbox is selected.
pan.pan_else()
pan.statictext('Value = 100')
pan.pan_else()
pan.editbox(tag='input', prompt='Alternative value', defaultVal='Enter text', width=20)
pan.pan_endif()
pan.display()
