next up previous contents
Next: 3.4 Using Tcl libraries Up: 3.3 Custom menubuttons and Previous: 3.3.1 Standard menus

3.3.2 QddbScript variables

QddbScript sets several variables you can use in your [code] statements or procedures:


qddbscript(schema) Currently open Qddb schema descriptor
qddbscript(trans_name) Current restricted directory for saving templates, etc.
qddbscript(search_entry) Tk entry widget for the ``search for:'' box
qddbscript_frame Current Tk frame widget (row)

The qddbscript array is for convenience and internal use within QddbScript. The most useful variable for application developers is qddbscript_frame. qddbscript_frame refers to the current innermost non-Fx frame (i.e. row). For example, you may want to set special options on a row's frame:

    [entry attr=Items.Qty]
    [entry attr=Items.Code]
    [code value={
        $qddbscript_frame configure -bd 10 -bg blue
    }]
    [break]

This code sequence will put a 10-pixel blue outline around the Items.Qty and Items.Code entries.



Herrin Software Development, Inc.