Skip to content

Class: RadioContainer

Properties | Events | Methods | Index of Classes

Groups multiple Radio objects in a non-visible object, providing selection of no more than one at a time

Hierarchy

cObject > cUIObject > DfBaseObject > DfBaseWindow > DfBaseUIWindow > DfBaseContainer > DfBaseGroup > Group > RadioGroup > RadioContainer

Show full hierarchy and direct subclasses

Library: Windows Application Class Library

Package: Windows.pkg

Mixins: NonVisual_Container_Mixin

Description

RadioContainer is used to group multiple Radio objects in a non-visual object, providing selection of no more than one at a time. This is used to create more-complicated visual interfaces where non-radio objects appear to be mixed with radio objects.

Sample

Object oG1 is a Group
    Set Label to "Complex Radio and Checkbox Group"
    Set Location to 15 10
    Set Size yo 120 200

    Object oG2 is a RadioContainer

        Object oRadio1 is a Radio
            Set Location to 10 10
            Set Label to "Enable Checkbox"
       End_Object

        Object oRadio2 is a Radio
            Set Location to 25 10
            Set Label to "Shadow Checkbox"
        End_Object

        Procedure Notify_Select_State Integer NewId Integer iOldId
            // If moving to first radio, enable checkbox, else disable
            If (iOldId=0) ;
                Delegate Send Shadow_Ckbox True
            Else ;
                Delegate Send Shadow_Ckbox False
        End_Procedure
    End_Object

    Object oC1 is a Checkbox
        Set Location to 10 90
        Set Label to "Checkbox"
    End_Object

    Procedure Shadow_CkBox Boolean bState
        Set Enabled_State of oC1 to (Not(bState))
    End_Procedure

End_Object

Syntax

Use Windows.pkg

Object object_name is a RadioContainer
    Set Enabled_State to True|False
    Set Status_Help to text

    Procedure Notify_Select_State integer toItem integer fromItem
        : //for augmentation
    End_Function

    Object object_name is a Radio
        Set Location to Row Column
        Set Label to text
    End_Object
    :
    Object object_name is a Radio
        Set Location to Row Column
        Set Label to text
    End_Object

End_Object

Note

This class is a subclass of the RadioGroup class and inherits all of its attributes. Since this is a non-visual grouping class, all visual properties (size, location, label, etc.) are effectively canceled. Because the Object is non-visual, the child radio objects will be located relative to this objects parent container.

This class is used when the program needs to appear to mix radio and non-radio objects within the same group. This is not permitted with radio-group objects, which may only contain radio objects. This can be simulated by placing the RadioContainer and the other non-radio objects within a non-radio container like a Group. The above example demonstrates this technique.