Google

CCP4 web logo CCP4i: Graphical User Interface
Documentation for Programmers
CreateToggleFrame

next button previous button top button

NAME

CreateToggleFrame - create multiple toggleable frames

SYNOPSIS

CreateToggleFrame counterVar procedure_name message_text frame_title add_button_text parameter_list

Optional Arguments:

-edit_proc edit_procedure_name
-noaddline
-dependendentframe dependent_procedure_name
-counter parent_counterVar
-child child_procedure_name

DESCRIPTION

Similar to an extending frame, a toggle frame is a mini table which is made up of a variable number of identical frames. Each frame contains the definition of one item such as a derivative in heavy atom refinement, or a chain in the definition of the molecular structure.

The frame will be drawn with two buttons at the bottom - the 'add' button will just add an extra row to the table, while the other, 'edit', button has other simple editing functions. The description of the frame to draw are in a separate procedure called procedure_name which must have been defined in the taskname.tcl file before the taskname_task_window procedure.

The other arguments to the CreateToggleFrame command are:

counterVar
which is the name of the variable which acts as a counter for the number of rows currently drawn
message_text
which is text to appear in the message line when the cursor is over the 'add' button
frame_title
which appears in the title line for the toggle frame
add_button_text
which is the text to appear in the 'add' button
parameter_list
which is a list of the parameters which are used in the procedure procedure_name
-edit_proc edit_procedure_name
The procedure edit_procedure_name is the name of a procedure which must have been defined in the taskname.tcl. This procedure will be called whenever the user uses the 'edit' button after the edit has been performed. This procedure may be needed to reset anything which is dependent on the contents of the extending frame.

The following optional arguments are only applicable if you have a dependent frame.

-noaddline
-dependendentframe dependent_procedure_name

The following optional arguments are only applicable if you have more complex 'parent and child' extending or toggle frames.

-counter parent_counterVar
-child child_procedure_name

HINTS

There are examples of toggle frames in the interface to DM - look at the code in $CCP4I_top/tasks/dm.tcl and search for 'DmDomainFrame' which is the name of the procedure used to define multiple NCS domains.

KEYWORDS