Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxRadioGroup Class

A container for radio buttons, functioning together.

#Declaration

Delphi
TcxRadioGroup = class(
    TcxCustomRadioGroup
)

#Remarks

The TcxRadioGroup object represents a number of grouped radio buttons. Grouped radio buttons affect each other – if a user checks one, the others become unchecked. A similar functionality can be implemented using TcxRadioButton controls with matching GroupIndex property values.

The collection of radio buttons in the radio group is represented by the Properties.Items property. You can access the collection to add, move and delete individual items using the methods it provides. Each item in the collection is represented by the TcxRadioGroupItem object. You can use the Caption property of this object to change the caption displayed beside the button.

Each item also has the Value property, which represents the EditValue of the radio group control. When you click the radio buttons, included into a group, that group’s EditValue accepts the Value property value of the checked button. And vice versa, supplying an EditValue checks an item, whose Value property matches the supplied EditValue.

Note

when the selected item’s Value property is equal to NULL, the radio group’s EditValue property returns the caption of the selected item.

The EditValue of the radio group is also affected by the ItemIndex property. If the ItemIndex property value is -1 (which means, that no item is selected within a group), then the EditValue accepts the value of the Properties.DefaultValue property.

You can specify the appearance and functionality of a radio group by the Properties and Style properties.

The following image demonstrates a radio group control, containing four items:

See Also