Helper Commands Used in Tablelist Binding Scripts

by

Csaba Nemethi

csaba.nemethi@t-online.de

Contents

Start page


Overview

The commands described in this reference page are used in the default binding scripts associated with the binding tag TablelistBody.  It is recommended to use them also in individual binding scripts for the binding tag whose name is returned by the bodytag subcommand of the Tcl command associated with a tablelist widget (see the DEFAULT AND INDIVIDUAL BINDINGS FOR THE TABLELIST BODY section of the corresponding reference page for details).

Contents     Start page


The tablelist::getTablelistPath Command

NAME
tablelist::getTablelistPath - Get the path name of a tablelist widget from the path name of one of its descendants

SYNOPSIS
tablelist::getTablelistPath descendantPathName
DESCRIPTION
This command gets the path name of a tablelist widget from the path name descendantPathName of one of its descendants.

In a binding script, the descendant widget corresponds to the event field %W, which can be the tablelist's body, one of the separator frames, a label widget displaying an embedded image, or (a descendant of) an embedded window.  The return value is often assigned to the help variable tablelist::W.

KEYWORDS
tablelist, path name, binding script

Contents     Start page


The tablelist::convEventFields Command

NAME
tablelist::convEventFields - Convert event fields relative to a descendant of a tablelist widget

SYNOPSIS
tablelist::convEventFields descendantPathName x y
DESCRIPTION
This command gets the path name of a tablelist widget and the x and y coordinates relative to the latter from the path name descendantPathName of one of its descendants and from the x and y coordinates x, y relative to this descendant.  The command returns these values as the components of a list consisting of three elements.

In a binding script, the descendant widget corresponds to the event field %W, which can be the tablelist's body, one of the separator frames, a label widget displaying an embedded image, or (a descendant of) an embedded window.  Likewise, the arguments x and y correspond to the event fields %x and %y.  The three elements of the list returned by the command are usually assigned to the help variables tablelist::W, tablelist::x, and tablelist::y, by using the statement
foreach {tablelist::W tablelist::x tablelist::y} \
    [tablelist::convEventFields %W %x %y] {}
KEYWORDS
tablelist, event fields, binding script

Contents     Start page