Name

Grid

tixGrid pathname [option value...]

The tixGrid command creates a new tixGrid widget named pathName. A tix-Grid widget presents a 2D grid of cells. Each cell may contain one Tix display item and can be formatted with a wide range of attributes.

Standard Options

-background

-borderwidth

-cursor

-font

-foreground

-highlightbackground

-highlightcolor

-highlightthickness

-padx

-pady

-relief

-selectbackground

-selectborderwidth

-selectforeground

-takefocus

-xscrollcommand

-yscrollcommand

 

Widget-Specific Options

-editdonecmd tclCommand (editDoneCmd, EditDoneCmd)

Command to call when the user has edited a grid cell. The column and row numbers of the cell are appended as arguments.

-editnotifycmd tclCommand (editNotifyCmd, EditNotifyCmd)

Command to call when the user tries to edit a grid cell. The column and row numbers of the cell are appended as arguments. The command should Return a boolean value to indicate whether the cell is editable.

-formatcmd tclCommand (formatCmd, FormatCmd)

Command to call when the grid cells need to be formatted on the screen. Five arguments are appended: Type x1 y1 x2 y2. type is the logical type of the region. It may be one of x-region (the horizontal margin), y-region (the vertical margin), s-region (area where margins are joined), or main (any other region). The last four arguments give the column and row numbers of the top left cell and bottom right cell of the af fected region.

-height integer (height, Height)

Number of rows in the grid. The default is 10.

-itemtype tclCommand ...

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.