
Next: FillOut / FillOutElm
Up: Element on a configuration page
Previous: EntryInt, Float
An ExtEntry is an element, which repeat one or more element.
- -text
- This is the title for the ExtEntry.
- -help
- This is help for the ExtEntry.
- -entries
- This is a list of names of elements which the
ExtEntry consists of.
- -count
- This is the number of repeated elements to be shown in the
ExtEntry.(default: 3)
- -maxentries
- This option sets a maximum on the number of
tuples which might be inserted. This is very usefull together with
Label. See the example below.(default: infinity)
- -orient
- This option takes either left or top as an
argument. It tells in which direction the ExtEntry should be packed.
If you select left, then the subelements will be packed side by
side, otherwise they will be packed on top of each other.(default:
left)
- -noscissor
- If this option is set to one, cut,
copy and paste will not be available for the ExtEntry.
- -lines
- If this option is set to one, lines will be created
between each pair of consecutive tuple.
- -default
- This is a list of default values for the elements, each
element in the list will be one tuple in the ExtEntry.
Line and header shall not have default values.
EX. ExtEntry ee -entries entry line checkbox -default {\text1 1}
{text2 0}\
In this example the line is ignored when giving default values.
- -index
- The is an element from the list of entries. The element
will be an index element, for the ExtEntry, with a fast index
associated with it. The element most be either a label, or an entry,
and may not be located inside a sub element (like a Frame
or a Window).
- -export
- This tells wether the widget shall be exported or not.
Elements of tuples, which are not specified with the -default
option, is initialized with their own -default value. This
means that if you specify five tuples for the -default option
for the ExtEntry, and you scroll to the sixth tuple, the element of this
tuple, will be initialized with thier own -default value. Eg.
if this tuple consist of a CheckBox, the -default value for
this CheckBox will be the initial value for the checkbox.
To run through the elements in an ExtEntry, you have to use the command
forevery which takes two arguments
- The name of the ExtEntry.
- A script to be evaluated for every tuple of data.
For each of these tuples the element of the ExtEntry links to
variables like usual. Eg. a CheckBox will link to a variable with the
same name as itself etc. Forevery works recursively ie. if an ExtEntry
is inside another ExtEntry then you have to do a forevery on
the outer before you can do it on the inner one. Like this:
forevery outer {
forevery inner {
# here are the variables
}
}
Label text
Entry color
ExtEntry colors \
-text "Here you can configure three colors" \
-default {
{"foreground" ""}
{"background" ""}
{"hilight" ""}
} \
-maxentries 3
Here we have three elements in the ExtEntry, and no more, they each
have a Label which indicate the color, and it is not posible
to insert extra elements, or change the label (from the endusers point
of view)
Next: FillOut / FillOutElm
Up: Element on a configuration page
Previous: EntryInt, Float
Jesper Kjær Pedersen <blackie@imada.ou.dk>
Wed Oct 2 13:29:53 MET DST 1996