RButtGrp.st
changeset 586 032b3245e53a
parent 198 c0f39f9440a7
child 594 b9c5a5e5f905
equal deleted inserted replaced
585:8f395aba0173 586:032b3245e53a
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
    12 
    13 OrderedCollection subclass:#RadioButtonGroup
    13 OrderedCollection subclass:#RadioButtonGroup
    14 	 instanceVariableNames:'valueChannel groupID'
    14 	instanceVariableNames:'valueChannel groupID'
    15 	 classVariableNames:''
    15 	classVariableNames:''
    16 	 poolDictionaries:''
    16 	poolDictionaries:''
    17 	 category:'Views-Support'
    17 	category:'Views-Support'
    18 !
    18 !
    19 
    19 
    20 !RadioButtonGroup class methodsFor:'documentation '!
    20 !RadioButtonGroup class methodsFor:'documentation '!
    21 
    21 
    22 copyright
    22 copyright
    37 "
    37 "
    38     RadioButtonGroups control the interaction between RadioButtons
    38     RadioButtonGroups control the interaction between RadioButtons
    39     turning off other button(s) when one of the group is pressed.
    39     turning off other button(s) when one of the group is pressed.
    40     To group some buttons (and have one-on behavior) use:
    40     To group some buttons (and have one-on behavior) use:
    41 
    41 
    42 	|g|
    42         |g|
    43 
    43 
    44 	g := RadioButtonGroup new.
    44         g := RadioButtonGroup new.
    45 	...
    45         ...
    46 	b1 := RadioButton label:....
    46         b1 := RadioButton label:....
    47 	g add:b1
    47         g add:b1
    48 	...
    48         ...
    49 	b2 := RadioButton label:....
    49         b2 := RadioButton label:....
    50 	g add:b2
    50         g add:b2
    51 	...
    51         ...
    52 
    52 
    53     A radioButtonGroup installs itself as the model of its toggles or
    53     A radioButtonGroup installs itself as the model of its toggles or
    54     radioButtons. Therefore, you can no longer operate the individual
    54     radioButtons. Therefore, you can no longer operate the individual
    55     elements on models.
    55     elements on models.
    56     Instead, the group now provides a valueHolder which takes as value 
    56     Instead, the group now provides a valueHolder which takes as value 
    59     See the last example for how this is done.
    59     See the last example for how this is done.
    60 
    60 
    61     The groupID instance variable is not required for normal operation;
    61     The groupID instance variable is not required for normal operation;
    62     the interface builder uses it to give a button-group some descriptive 
    62     the interface builder uses it to give a button-group some descriptive 
    63     (unique) name.
    63     (unique) name.
    64 "
    64 
       
    65     [author:]
       
    66         Claus Gittinger
       
    67 "
       
    68 
       
    69     "Modified: 25.4.1996 / 17:40:00 / cg"
    65 !
    70 !
    66 
    71 
    67 examples 
    72 examples 
    68 "
    73 "
    69     example (using Toggles for 'at most one-on behavior'):
    74     example (using Toggles for 'at most one-on behavior'):
   176 
   181 
   177     "Created: 15.11.1995 / 17:14:53 / cg"
   182     "Created: 15.11.1995 / 17:14:53 / cg"
   178 !
   183 !
   179 
   184 
   180 version
   185 version
   181     ^ '$Header: /cvs/stx/stx/libwidg/Attic/RButtGrp.st,v 1.19 1995-11-23 02:28:44 cg Exp $'
   186     ^ '$Header: /cvs/stx/stx/libwidg/Attic/RButtGrp.st,v 1.20 1996-04-25 17:31:36 cg Exp $'
   182 ! !
   187 ! !
   183 
   188 
   184 !RadioButtonGroup methodsFor:'accessing'!
   189 !RadioButtonGroup methodsFor:'accessing'!
   185 
   190 
   186 groupID
   191 groupID