| **Navigation:**  [[templates.htm|Templates]] > Guide to all Templates > Code Templates >====== Select Embed Type ====== | [[tplextensionlocalbusinessrulesusedglobal.htm|{{btn_prev_n.gif|Previous page}}]][[templates.htm|{{btn_home_n.gif|Return to chapter overview}}]][[tplcodeadobrowserefresh.htm|{{btn_next_n.gif|Next page}}]] | | || This dialog lets you specify what to embed at this point. CLICK on the item to embed, then press the **Select** button. The choices are: | **Call a procedure** | Provides a dialog that lets you specify a procedure to call. | | **SOURCE** | Calls the Text Editor, allowing you to hand code the embedded source. | | **Code Templates** | The templates listed here depend on the templates you have [[gen100.htm|registered]]. Code templates generate executable code. Generally, each Code template has one well-defined task. For example, the Initiate Thread Code template simply starts a new execution thread, and no more. Typically, the Code template provides a dialog box with options and instructions. | There are many Code Templates included with Clarion (see the help TOC for a complete list): | __CallABCMethod__TPLCodeCallABCMethod | Generates code to call an ABC Library object met | | __Call Procedure As Lookup__TPLCodeCallProcedureAsLookup | This code template lets you call a procedure, usually a Browse, with a request to make a selection. | | __Close Current Window__TPLCodeCloseCurrentWindow | This code template simply posts an EVENT:CloseWindow, which tells the currently active window to close. | | __Control Value Validation__Control_Value_Validation_code_template | This code template validates the value of an entry control (ENTRY, LIST, COMBO, or SPIN). You can add this code template to a field event on a control; at the Accepted or Selected embed point. | | __DisplayPopupMenu__TPLCodePreparePopup_General | Generates code to define and display a popup menu, and optionally, act on the end user's selection. | | __Export to XML__TPLCodeExportToXML | Used to write the contents of a valid data source (or origin) to an external XML file. | | __Initiate Thread__TPLCodeInitiateThread | This code template initiates an execution thread when opening an MDI window. | | [[tpllookupnonrelated.htm|Lookup Up Non-Related Record]] | This code template is used to perform a lookup of a value based on a relationship not defined in the Data Dictionary (ad hoc relations). You can add this code template to the Lookup Up Related Records embed point. | | [[resizesetstrategy.htm|ResizeSetStrategy]] | Lets you override the default resize strategy for a particular control | | __SelectToolbarTarget__TPLCodeSelectToolbarTarget | This Code template provides an easy way to control which Browsebox is tied to the Toolbar navigation buttons (see **[[tplcontrolframebrowsecontrol.htm|FrameBrowseControl]]**). | | __SetABCProperty__TPLCodeSetABCProperty | Generates code to set a public property of an ABC Library object | | __SetProperty__TPLCodeSetProperty | This Code template provides an easy way to set a runtime property of any control on a window. |