Adding Callback CodeCallback code assigns programmatic actions to the components configured in the GUI. In this step, you will add code that displays a different message in the second label depending on which radio button is selected. Each dialog project in Komodo contains two files. One file (with a "_ui" suffix in the file name, in this case "dlg_tcl_check_ui.tcl") is regenerated each time the GUI Builder is run. Therefore, user code should never be placed in this file. The other file (without the "_ui" suffix, in this case "dlg_tcl_check.tcl") is used to store the user code, which will be preserved regardless of future edits to the dialog. Open the Program FileIn the GUI Builder, select Commands|View Code. This will open the dlg_tcl_check.tcl file in the Komodo editor pane. ![]() Add Code to the Radio ButtonsIn this section, you'll add code that will make a different message display in the label widget depending on which radio button is selected.
Note that the text is associated with the widget by specifying the widget
name in the
|