JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Using the RadioButton Class

As discussed in the In Depth section of this chapter, radio buttons are much like checkboxes, except that they're usually used in groups. Here is the class hierarchy of the RadioButton class:

Object
   MarshalByRefObject
      Component
         Control
            ButtonBase
               RadioButton

You can find the more notable public properties of the RadioButton class in Table 6.5, the notable methods in Table 6.6, and the notable events in Table 6.7, including those inherited from the ButtonBase class. Note that as with other controls, I am not listing the notable properties, methods, and events RadioButton inherits from the Control class, such as the Click event—you can see all that in Chapter 5, Tables 5.1, 5.2, and 5.3.

Table 6.5: Noteworthy public properties of RadioButton objects.

Property

Means

Appearance

Gets/sets the value that determines the appearance of the radio button.

AutoCheck

Gets/sets a value indicating whether the Checked value and the appearance of the | control automatically change when the radio button is clicked.

Checked

Gets/sets a value indicating whether the radio button is checked.

FlatStyle

Gets/sets the flat style appearance of the radio button.

Image

Gets/sets the image that is displayed in a radio button.

ImageAlign

Gets/sets the alignment of the image in a radio button.

ImageIndex

Gets/sets the image list index value of the image displayed in a radio button.

ImageList

Gets/sets the ImageList that contains the image displayed in a radio button.

TextAlign

Gets/sets the alignment of the text in a radio button.

Table 6.6: Noteworthy public methods of RadioButton objects.

Method

Means

PerformClick

Generates a Click event for the radio button, simulating a click by a user.

Table 6.7: Noteworthy public events of RadioButton objects.

Event

Means

AppearanceChanged

Occurs when the Appearance property changes.

CheckedChanged

Occurs when the value of the Checked property changes.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor