Skip to content

Radio_Object - RadioGroup

Returns the handle of a radio object for a passed radio item

Type: Function
Return Data Type: Integer

Parameters

Parameter Type Description
Item# Integer

Syntax

Function Radio_Object Integer Item# Returns Integer

Call Example

Get Radio_Object Item# to IntegerVariable

Description

Radio_Object returns the handle of a radio object for a passed radio Item#.

Sample

Object oRadioGroup1 is a RadioGroup
    Set Location to 9 9
    Set Label to "Output to:"
    Set Size to 58 65

    Object oPrinterRadio is a Radio
        Set Label to "To printer"
        Set Size to 10 61
        Set Location to 10 5
    End_Object    // oRadio1

    Object oFileRadio is a Radio
        Set Label to "To file"
        Set Size to 10 61
        Set Location to 25 5
    End_Object    // oRadio2

    Object oScreenRadio is a Radio
        Set Label to "To Screen"
        Set Size to 10 61
        Set Location to 40 5
    End_Object    // oRadio3

    Procedure Notify_Select_State Integer iToItem Integer iFromItem
        Handle hoRadio

        Forward Send Notify_Select_State iToItem iFromItem

        Register_Object oPrinterForm
        Register_Object oFileForm

        Get Radio_Object iToItem to hoRadio

        Case Begin
            Case (hoRadio = oPrinterRadio)
                Set Enabled_State of oPrinterForm to True
                Set Enabled_State of oFileForm to False
                Case Break
            Case (hoRadio = oFileRadio)
                Set Enabled_State of oPrinterForm to False
                Set Enabled_State of oFileForm to True
                Case Break
            Case (hoRadio = oScreenRadio)
                Set Enabled_State of oPrinterForm to False
                Set Enabled_State of oFileForm to False
                Case Break
        Case End
    End_Procedure // Notify_Select_State

    //If you set Current_Radio, you must set it AFTER the
    //radio objects have been created AND AFTER Notify_Select_State has been
    //created. i.e. Set in bottom-code of object at the end!!
    //Set Current_Radio To 0
End_Object

Return Value

Returns the radio object handle for index position Item#