replacing UI elements depending on user selection
<p>I am trying to create a UI that will update depending on what a user selects.  My initial thought was to delete the UI element if it existed and replace it with a new one with new elements. I've looked around for an answer to this, and if there is one out there, I am too new to understand it. 
I have a frame layout that contains a text scroll list.  When something is selected in that list, a function is called to create the part of the UI that fills with controls.  I get the error "NameError: name 'columnLayout' is not defined".
here is the part of the code that I have problems with:</p>

<pre><code>if columnLayout(button_layout,exists = True):
    cmds.deleteUI(button_layout)
button_layout = 'button_layout'
ui_elements['column'] = cmds.columnLayout(button_layout)
ui_elements['buttons1']= cmds.button()
ui_elements['buttons2']=cmds.button()
ui_elements['buttons3']=cmds.button()

cmds.formLayout( ui_elements['form_layout'], edit=True, attachForm=[(ui_elements['column'], 'top', 5), (ui_elements['column'], 'right', 20) ] )

cmds.showWindow( window )
</code></pre>

<p>ui_elements['form_layout'] is created in the previous function.  I appreciate any help, than you very much</p>