Overview of Item Types
Groups automatically resize themselves to contain all of their members - thus adding, removing, or repositioning a member implicitly changes the size of the group. See the pad addgroupmember
and removegroupmember
commands and the -member itemconfigure option below for setting group membership, and the getgroup
command for testing group membership.
When an event hits a group, it normally passes through the group object to its members. However, it is possible to configure a group object so that it grabs the events and does not pass them through. See the -divisible flag.
Groups are created with widget commands of the following form:
pathName create group [option value option value ...]There may be any number of option-value pairs, each of which sets one of the configuration options for the item. These same option-value pairs may be used in itemconfigure widget commands to change the item's configuration. The following options are supported for groups:
[27] -divisible boolean
(available only for grid, group, and HTML item types)
Specifies whether events should go to group members. If -divisible is 1 (true), events never go to the group object, but pass through it to the members. If the event is within the bounding box of the group, but does not hit any members, then it will be ignored by the group. If -divisible is 0 (false), then the event will go the group if it is within the bounding box of the group whether there is a member at the place the event points to or not. Defaults to 1 (true).
(available only for group and HTML item types)
members is a list of object ids that specify the list of members of this group. Setting the members of a group first removes all existing members, and then inserts the new members. The members are rendered in the order they are specified in members.
Generated with Harlequin WebMaker